package GUI;

import java.awt.Color;
import javax.swing.JOptionPane;
import DAO.*;
import java.awt.Component;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.KeyEvent;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.Vector;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.table.DefaultTableModel;
import javax.swing.text.AttributeSet;
import javax.swing.text.PlainDocument;

public class Main_Frm_3 extends javax.swing.JFrame {

    public Main_Frm_3() {
        initComponents();
        //depDAO = new DepartmentDAO();
//        empDAO = new EmployeeDAO();
//        vacDAO = new VacancyDAO();
//        secDAO = new SectionDAO();
//        userDAO = new UserDAO();
//        vacFillDAO = new VacancyFillDAO();
//        
//        empConnect = true;
//        desConnect = true;
//        secConnect = true;
//        vacConnect = true;
//        userConnect = true;
//        vacFillConnect = true;

        this.setLocationRelativeTo(null);
        showLogin();
        setMaxLengthTextField();

    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        grdJobConfirm = new javax.swing.ButtonGroup();
        grdOrgChooseTable = new javax.swing.ButtonGroup();
        grdOrgVacFillConfirm = new javax.swing.ButtonGroup();
        pnlLogin = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel82 = new javax.swing.JLabel();
        jLabel83 = new javax.swing.JLabel();
        txtLoginUsername = new javax.swing.JTextField();
        pwfLoginPassword = new javax.swing.JPasswordField();
        btnLogin = new javax.swing.JButton();
        lblLoginCheckUsername = new javax.swing.JLabel();
        lblLoginCheckPassword = new javax.swing.JLabel();
        pnlAll = new javax.swing.JPanel();
        pnlAll_Head = new javax.swing.JPanel();
        btnMasterDep = new javax.swing.JButton();
        btnMasterEmp = new javax.swing.JButton();
        btnMasterDes = new javax.swing.JButton();
        btnMasterVac = new javax.swing.JButton();
        btnMasterSec = new javax.swing.JButton();
        btnMasterUser = new javax.swing.JButton();
        pnlAll_Wellcome = new javax.swing.JPanel();
        btnEditUser = new javax.swing.JButton();
        lblWellcome = new javax.swing.JLabel();
        lblUser = new javax.swing.JLabel();
        lblAcclevel = new javax.swing.JLabel();
        pnlAll_Body = new javax.swing.JPanel();
        pnlAll_Body_Main = new javax.swing.JPanel();
        pnlAll_Body_Main_Head = new javax.swing.JPanel();
        pnlDepHead = new javax.swing.JPanel();
        jlblDepCode = new javax.swing.JLabel();
        txtDepInputCode = new javax.swing.JTextField();
        btnDepViewTable = new javax.swing.JButton();
        btnDepStart = new javax.swing.JButton();
        lblDepInsertCode = new javax.swing.JLabel();
        lblDepCheckInputCode = new javax.swing.JLabel();
        pnlEmpHead = new javax.swing.JPanel();
        jlbEmpCode = new javax.swing.JLabel();
        txtEmpInputCode = new javax.swing.JTextField();
        btnEmpViewTable = new javax.swing.JButton();
        btnEmpStart = new javax.swing.JButton();
        lblEmpInsertCode = new javax.swing.JLabel();
        lblEmpCheckInputCode = new javax.swing.JLabel();
        pnlDesHead = new javax.swing.JPanel();
        jlblDesCode = new javax.swing.JLabel();
        txtDesInputCode = new javax.swing.JTextField();
        btnDesViewTable = new javax.swing.JButton();
        btnDesStart = new javax.swing.JButton();
        lblDesInsertCode = new javax.swing.JLabel();
        lblDesCheckInputCode = new javax.swing.JLabel();
        pnlVacHead = new javax.swing.JPanel();
        jlbVacCode = new javax.swing.JLabel();
        txtVacInputCode = new javax.swing.JTextField();
        btnVacViewTable = new javax.swing.JButton();
        btnVacStart = new javax.swing.JButton();
        lblVacInsertCode = new javax.swing.JLabel();
        lblVacCheckInputCode = new javax.swing.JLabel();
        pnlSecHead = new javax.swing.JPanel();
        jlblUsername1 = new javax.swing.JLabel();
        txtSecInputCode = new javax.swing.JTextField();
        btnSecViewTable = new javax.swing.JButton();
        btnSecStart = new javax.swing.JButton();
        lblSecInsertCode = new javax.swing.JLabel();
        lblSecCheckInputCode = new javax.swing.JLabel();
        pnlUserHead = new javax.swing.JPanel();
        jlblUsername = new javax.swing.JLabel();
        txtUserInputCode = new javax.swing.JTextField();
        btnUserViewTable = new javax.swing.JButton();
        btnUserStart = new javax.swing.JButton();
        lblUserInsertCode = new javax.swing.JLabel();
        lblUserCheckInputCode = new javax.swing.JLabel();
        pnlAll_Body_Main_Bottom = new javax.swing.JPanel();
        pnlDepBody = new javax.swing.JPanel();
        pnlDepInfor = new javax.swing.JPanel();
        jLabel89 = new javax.swing.JLabel();
        jLabel96 = new javax.swing.JLabel();
        jLabel97 = new javax.swing.JLabel();
        jLabel98 = new javax.swing.JLabel();
        jLabel99 = new javax.swing.JLabel();
        txtDepNo = new javax.swing.JTextField();
        txtDepName = new javax.swing.JTextField();
        txtDepHead = new javax.swing.JTextField();
        txtDepLocation = new javax.swing.JTextField();
        btnDepInsert = new javax.swing.JButton();
        btnDepReset = new javax.swing.JButton();
        btnDepCancel = new javax.swing.JButton();
        lblDepNoCheck = new javax.swing.JLabel();
        lblDepNameCheck = new javax.swing.JLabel();
        lblDepHeadCheck = new javax.swing.JLabel();
        lblDepLocalCheck = new javax.swing.JLabel();
        pnlDepTable = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblDep = new javax.swing.JTable(){
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        btnDepTableCancel = new javax.swing.JButton();
        btnDepTableOk = new javax.swing.JButton();
        pnlEmpBody = new javax.swing.JPanel();
        pnlEmpInfor = new javax.swing.JPanel();
        jTitleEmpInfo = new javax.swing.JLabel();
        jLabel101 = new javax.swing.JLabel();
        jLabel102 = new javax.swing.JLabel();
        jLabel103 = new javax.swing.JLabel();
        jLabel104 = new javax.swing.JLabel();
        jLabel106 = new javax.swing.JLabel();
        jLabel107 = new javax.swing.JLabel();
        jLabel108 = new javax.swing.JLabel();
        jLabel109 = new javax.swing.JLabel();
        jLabel105 = new javax.swing.JLabel();
        txtEmpId = new javax.swing.JTextField();
        txtEmpName = new javax.swing.JTextField();
        cbEmpDepNo = new javax.swing.JComboBox();
        cbEmpDesId = new javax.swing.JComboBox();
        cbEmpSecId = new javax.swing.JComboBox();
        txtEmpAddress = new javax.swing.JTextField();
        txtEmpPhone = new javax.swing.JTextField();
        txtEmpFax = new javax.swing.JTextField();
        txtEmpEmail = new javax.swing.JTextField();
        lblEmpIdCheck = new javax.swing.JLabel();
        lblEmpNameCheck = new javax.swing.JLabel();
        lblEmpDepNoCheck = new javax.swing.JLabel();
        lblEmpDesIdCheck = new javax.swing.JLabel();
        lblEmpSecIdCheck = new javax.swing.JLabel();
        lblEmpAddressCheck = new javax.swing.JLabel();
        lblEmpPhoneCheck = new javax.swing.JLabel();
        lblEmpFaxCheck = new javax.swing.JLabel();
        lblEmpEmailCheck = new javax.swing.JLabel();
        btnEmpInsert = new javax.swing.JButton();
        btnEmpReset = new javax.swing.JButton();
        btnEmpCancel = new javax.swing.JButton();
        pnlEmpTable = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        tblEmp = new javax.swing.JTable(){
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        jPanel2 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        btnEmpTableOk = new javax.swing.JButton();
        btnEmpTableCancel = new javax.swing.JButton();
        pnlDesBody = new javax.swing.JPanel();
        pnlDesInfor = new javax.swing.JPanel();
        jLabel90 = new javax.swing.JLabel();
        jLabel110 = new javax.swing.JLabel();
        jLabel111 = new javax.swing.JLabel();
        txtDesId = new javax.swing.JTextField();
        txtDesName = new javax.swing.JTextField();
        btnDesInsert = new javax.swing.JButton();
        btnDesReset = new javax.swing.JButton();
        btnDesCancel = new javax.swing.JButton();
        lblDesIdCheck = new javax.swing.JLabel();
        lblDesNameCheck = new javax.swing.JLabel();
        pnlDesTable = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        tblDes = new javax.swing.JTable(){
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        jPanel3 = new javax.swing.JPanel();
        jlblSelectDes = new javax.swing.JLabel();
        btnDesTableOk = new javax.swing.JButton();
        btnDesTableCancel = new javax.swing.JButton();
        pnlVacBody = new javax.swing.JPanel();
        pnlVacInfor = new javax.swing.JPanel();
        jTitleEmpInfo1 = new javax.swing.JLabel();
        jLabel112 = new javax.swing.JLabel();
        jLabel113 = new javax.swing.JLabel();
        jLabel114 = new javax.swing.JLabel();
        jLabel115 = new javax.swing.JLabel();
        jLabel116 = new javax.swing.JLabel();
        jLabel117 = new javax.swing.JLabel();
        jLabel118 = new javax.swing.JLabel();
        jLabel119 = new javax.swing.JLabel();
        txtVacId = new javax.swing.JTextField();
        cbVacDepNo = new javax.swing.JComboBox();
        cbVacSecId = new javax.swing.JComboBox();
        cbVacDesId = new javax.swing.JComboBox();
        txtVacNoOf = new javax.swing.JTextField();
        cbVacStatus = new javax.swing.JComboBox();
        txtVacDate = new javax.swing.JTextField();
        txtVacPriority = new javax.swing.JTextField();
        lblVacIdCheck = new javax.swing.JLabel();
        lblVacDepNoCheck = new javax.swing.JLabel();
        lblVacSecIdCheck = new javax.swing.JLabel();
        lblVacDesIdCheck = new javax.swing.JLabel();
        lblVacNoOfCheck = new javax.swing.JLabel();
        lblVacStatusCheck = new javax.swing.JLabel();
        lblVacDateCheck = new javax.swing.JLabel();
        lblVacPriorityCheck = new javax.swing.JLabel();
        btnVacInsert = new javax.swing.JButton();
        btnVacReset = new javax.swing.JButton();
        btnVacCancel = new javax.swing.JButton();
        btnVacPickDate = new javax.swing.JButton();
        pnlVacTable = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        tblVac = new javax.swing.JTable(){
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        jPanel4 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        btnVacTableOk = new javax.swing.JButton();
        btnVacTableCancel = new javax.swing.JButton();
        pnlSecBody = new javax.swing.JPanel();
        pnlSecInfor = new javax.swing.JPanel();
        jLabel92 = new javax.swing.JLabel();
        jLabel124 = new javax.swing.JLabel();
        jLabel125 = new javax.swing.JLabel();
        jLabel126 = new javax.swing.JLabel();
        jLabel128 = new javax.swing.JLabel();
        txtSecId = new javax.swing.JTextField();
        txtSecName = new javax.swing.JTextField();
        txtSecInch = new javax.swing.JTextField();
        cbSecDepNo = new javax.swing.JComboBox();
        lblSecIdCheck = new javax.swing.JLabel();
        lblSecNameCheck = new javax.swing.JLabel();
        lblSecDepNoCheck = new javax.swing.JLabel();
        lblSecInchCheck = new javax.swing.JLabel();
        btnSecInsert = new javax.swing.JButton();
        btnSecReset = new javax.swing.JButton();
        btnSecCancel = new javax.swing.JButton();
        pnlSecTable = new javax.swing.JPanel();
        jScrollPane7 = new javax.swing.JScrollPane();
        tblSec = new javax.swing.JTable(){
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        jPanel6 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        btnSecTableOk = new javax.swing.JButton();
        btnSecTableCancel = new javax.swing.JButton();
        pnlUserBody = new javax.swing.JPanel();
        pnlUserInfor = new javax.swing.JPanel();
        jLabel91 = new javax.swing.JLabel();
        jLabel100 = new javax.swing.JLabel();
        jLabel120 = new javax.swing.JLabel();
        jLabel121 = new javax.swing.JLabel();
        jLabel122 = new javax.swing.JLabel();
        jLabel123 = new javax.swing.JLabel();
        txtUsername = new javax.swing.JTextField();
        pwfUserPass = new javax.swing.JPasswordField();
        pwfUserRePass = new javax.swing.JPasswordField();
        cbUserEmpId = new javax.swing.JComboBox();
        cbUserAccLevel = new javax.swing.JComboBox();
        lblUsernameCheck = new javax.swing.JLabel();
        lblUserPasswordCheck = new javax.swing.JLabel();
        lblUserEmpIdCheck = new javax.swing.JLabel();
        lblUserAccLevelCheck = new javax.swing.JLabel();
        lblUserRePasswordCheck = new javax.swing.JLabel();
        btnUserInsert = new javax.swing.JButton();
        btnUserReset = new javax.swing.JButton();
        btnUserCancel = new javax.swing.JButton();
        pnlUserTable = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        tblUser = new javax.swing.JTable(){
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        jPanel5 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        btnUserTableOk = new javax.swing.JButton();
        btnUserTableCancel = new javax.swing.JButton();
        pnlOrg = new javax.swing.JPanel();
        pnlAll_Head1 = new javax.swing.JPanel();
        btnVacFillMaster = new javax.swing.JButton();
        btnJobMaster = new javax.swing.JButton();
        btnOrgMaster = new javax.swing.JButton();
        btnHierachyMaster = new javax.swing.JButton();
        btnMasterSec1 = new javax.swing.JButton();
        pnlAll_Wellcome1 = new javax.swing.JPanel();
        btnEditUser1 = new javax.swing.JButton();
        lblWellcome1 = new javax.swing.JLabel();
        lblUser1 = new javax.swing.JLabel();
        lblAcclevel1 = new javax.swing.JLabel();
        pnlOrg_Main = new javax.swing.JPanel();
        pnlOrg_Hierachy = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jLabel26 = new javax.swing.JLabel();
        scpOrgDepList = new javax.swing.JScrollPane();
        listOrgDep = new javax.swing.JList();
        scpOrgTable = new javax.swing.JScrollPane();
        tblOrg = new javax.swing.JTable(){
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        jLabel31 = new javax.swing.JLabel();
        jPanel8 = new javax.swing.JPanel();
        jLabel32 = new javax.swing.JLabel();
        rdbOrgEmp = new javax.swing.JRadioButton();
        rdbOrgSec = new javax.swing.JRadioButton();
        rdbOrgVac = new javax.swing.JRadioButton();
        pnlOrg_VacFill = new javax.swing.JPanel();
        pnlVacFill_Head = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        txtVacFillInputCode = new javax.swing.JTextField();
        btnVacFillViewTableVac = new javax.swing.JButton();
        lblVacFillCheckInputCode = new javax.swing.JLabel();
        btnVacFillStart = new javax.swing.JButton();
        lblVacFillEmpId = new javax.swing.JLabel();
        pnlVacFill_Bottom = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        txtVacFillDate = new javax.swing.JTextField();
        scpVacFillIntake = new javax.swing.JScrollPane();
        txaVacFillIntake = new javax.swing.JTextArea();
        btnVacFillInsert = new javax.swing.JButton();
        btnVacFillReset = new javax.swing.JButton();
        btnVacFillCancel = new javax.swing.JButton();
        lblVacFillDateCheck = new javax.swing.JLabel();
        lblVacFillIntakeCheck = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        pnlOrg_JobRotation = new javax.swing.JPanel();
        pnlJobRotation_Head = new javax.swing.JPanel();
        rdbConfirmVacFillDetails = new javax.swing.JRadioButton();
        rdbEmergencyJobRotation = new javax.swing.JRadioButton();
        jLabel9 = new javax.swing.JLabel();
        txtJobInputCode = new javax.swing.JTextField();
        btnJobView = new javax.swing.JButton();
        lblCheckJobInputCode = new javax.swing.JLabel();
        btnJobStart = new javax.swing.JButton();
        pnlJobRotation_Bottom = new javax.swing.JPanel();
        pnlConfirmVac = new javax.swing.JPanel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        txtJobConfirmVacDes = new javax.swing.JTextField();
        txtJobConfirmVacDep = new javax.swing.JTextField();
        btnJobConfirmVacOldShowMore = new javax.swing.JButton();
        btnJobConfirmVacNewShowMore = new javax.swing.JButton();
        scpJobConfirmVacRemark = new javax.swing.JScrollPane();
        txaJobConfirmVacRemark = new javax.swing.JTextArea();
        rdbJobConfirmVacConfim = new javax.swing.JRadioButton();
        rdbJobConfirmVacDeny = new javax.swing.JRadioButton();
        lblCheckJobConfirmVac = new javax.swing.JLabel();
        btnConfirmVacOk = new javax.swing.JButton();
        btnConfirmVacCancel = new javax.swing.JButton();
        pnlEmergency = new javax.swing.JPanel();
        jLabel24 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        txtEmerDes = new javax.swing.JTextField();
        cbEmerDep = new javax.swing.JComboBox();
        cbEmerSec = new javax.swing.JComboBox();
        scpEmergencyRemark = new javax.swing.JScrollPane();
        txaEmergencyRemark = new javax.swing.JTextArea();
        jLabel33 = new javax.swing.JLabel();
        lblCheckEmerDep = new javax.swing.JLabel();
        lblCheckEmerSec = new javax.swing.JLabel();
        btnEmerOk = new javax.swing.JButton();
        btnEmerCancel = new javax.swing.JButton();
        mnuBar = new javax.swing.JMenuBar();
        mnuMaster = new javax.swing.JMenu();
        mniDep = new javax.swing.JMenuItem();
        mniEmp = new javax.swing.JMenuItem();
        mniDes = new javax.swing.JMenuItem();
        mniVac = new javax.swing.JMenuItem();
        mniSec = new javax.swing.JMenuItem();
        mniUser = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        mniExit = new javax.swing.JMenuItem();
        mnuOrganization = new javax.swing.JMenu();
        mniVacFill = new javax.swing.JMenuItem();
        mniJobRole = new javax.swing.JMenuItem();
        mniOrg = new javax.swing.JMenuItem();
        mniEmpHierachy = new javax.swing.JMenuItem();
        mnuHelp = new javax.swing.JMenu();
        mniAbout = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("IMPRO SOFTWARE");
        setPreferredSize(new java.awt.Dimension(896, 700));
        setResizable(false);
        getContentPane().setLayout(new java.awt.CardLayout());

        pnlLogin.setBackground(new java.awt.Color(51, 204, 255));
        pnlLogin.setForeground(new java.awt.Color(255, 255, 255));

        jLabel1.setFont(new java.awt.Font("Segoe UI", 0, 48)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("Wellcome to IMPRO");

        jLabel82.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        jLabel82.setForeground(new java.awt.Color(255, 255, 255));
        jLabel82.setText("USERNAME");

        jLabel83.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        jLabel83.setForeground(new java.awt.Color(255, 255, 255));
        jLabel83.setText("PASSWORD");

        txtLoginUsername.setFont(new java.awt.Font("Segoe UI Light", 0, 18)); // NOI18N

        pwfLoginPassword.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                pwfLoginPasswordKeyPressed(evt);
            }
        });

        btnLogin.setBackground(new java.awt.Color(255, 255, 255));
        btnLogin.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnLogin.setText("LOGIN");
        btnLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLoginActionPerformed(evt);
            }
        });

        lblLoginCheckUsername.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        lblLoginCheckUsername.setForeground(new java.awt.Color(255, 0, 0));
        lblLoginCheckUsername.setText("Enter Username...");

        lblLoginCheckPassword.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        lblLoginCheckPassword.setForeground(new java.awt.Color(255, 0, 0));
        lblLoginCheckPassword.setText("Enter Password...");

        javax.swing.GroupLayout pnlLoginLayout = new javax.swing.GroupLayout(pnlLogin);
        pnlLogin.setLayout(pnlLoginLayout);
        pnlLoginLayout.setHorizontalGroup(
            pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlLoginLayout.createSequentialGroup()
                .addGroup(pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlLoginLayout.createSequentialGroup()
                        .addGap(222, 222, 222)
                        .addComponent(jLabel1))
                    .addGroup(pnlLoginLayout.createSequentialGroup()
                        .addGap(261, 261, 261)
                        .addGroup(pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(btnLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(pnlLoginLayout.createSequentialGroup()
                                .addGroup(pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel82)
                                    .addComponent(jLabel83))
                                .addGap(23, 23, 23)
                                .addGroup(pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(lblLoginCheckPassword, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(txtLoginUsername, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE)
                                    .addComponent(pwfLoginPassword)
                                    .addComponent(lblLoginCheckUsername, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))))
                .addContainerGap(308, Short.MAX_VALUE))
        );

        pnlLoginLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {pwfLoginPassword, txtLoginUsername});

        pnlLoginLayout.setVerticalGroup(
            pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlLoginLayout.createSequentialGroup()
                .addGap(134, 134, 134)
                .addComponent(jLabel1)
                .addGap(73, 73, 73)
                .addGroup(pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtLoginUsername, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel82))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblLoginCheckUsername)
                .addGap(30, 30, 30)
                .addGroup(pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(pwfLoginPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel83))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblLoginCheckPassword)
                .addGap(43, 43, 43)
                .addComponent(btnLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(193, Short.MAX_VALUE))
        );

        pnlLoginLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {pwfLoginPassword, txtLoginUsername});

        getContentPane().add(pnlLogin, "card2");

        pnlAll.setBackground(new java.awt.Color(255, 255, 255));
        pnlAll.setForeground(new java.awt.Color(255, 255, 255));

        pnlAll_Head.setBackground(new java.awt.Color(255, 255, 255));
        pnlAll_Head.setForeground(new java.awt.Color(255, 255, 255));

        btnMasterDep.setBackground(new java.awt.Color(255, 255, 255));
        btnMasterDep.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        btnMasterDep.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/New folder/Department.png"))); // NOI18N
        btnMasterDep.setText("Department");
        btnMasterDep.setToolTipText("Department Master");
        btnMasterDep.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnMasterDep.setRequestFocusEnabled(false);
        btnMasterDep.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnMasterDep.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMasterDepActionPerformed(evt);
            }
        });

        btnMasterEmp.setBackground(new java.awt.Color(255, 255, 255));
        btnMasterEmp.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        btnMasterEmp.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/New folder/Employee2.png"))); // NOI18N
        btnMasterEmp.setText("Employee");
        btnMasterEmp.setToolTipText("Employee Master");
        btnMasterEmp.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnMasterEmp.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnMasterEmp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMasterEmpActionPerformed(evt);
            }
        });

        btnMasterDes.setBackground(new java.awt.Color(255, 255, 255));
        btnMasterDes.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        btnMasterDes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/New folder/Designation.png"))); // NOI18N
        btnMasterDes.setText("Designation");
        btnMasterDes.setToolTipText("Designation Master");
        btnMasterDes.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnMasterDes.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnMasterDes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMasterDesActionPerformed(evt);
            }
        });

        btnMasterVac.setBackground(new java.awt.Color(255, 255, 255));
        btnMasterVac.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        btnMasterVac.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/New folder/Vacancy.png"))); // NOI18N
        btnMasterVac.setText("Vacancy");
        btnMasterVac.setToolTipText("Vacancy Master");
        btnMasterVac.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnMasterVac.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnMasterVac.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMasterVacActionPerformed(evt);
            }
        });

        btnMasterSec.setBackground(new java.awt.Color(255, 255, 255));
        btnMasterSec.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        btnMasterSec.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/New folder/Section.png"))); // NOI18N
        btnMasterSec.setText("Section");
        btnMasterSec.setToolTipText("Section Master");
        btnMasterSec.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnMasterSec.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnMasterSec.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMasterSecActionPerformed(evt);
            }
        });

        btnMasterUser.setBackground(new java.awt.Color(255, 255, 255));
        btnMasterUser.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        btnMasterUser.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/New folder/User.png"))); // NOI18N
        btnMasterUser.setText("User");
        btnMasterUser.setToolTipText("User Master");
        btnMasterUser.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnMasterUser.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnMasterUser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMasterUserActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlAll_HeadLayout = new javax.swing.GroupLayout(pnlAll_Head);
        pnlAll_Head.setLayout(pnlAll_HeadLayout);
        pnlAll_HeadLayout.setHorizontalGroup(
            pnlAll_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAll_HeadLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnMasterDep)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnMasterEmp)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnMasterDes)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnMasterVac)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnMasterSec, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnMasterUser, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlAll_HeadLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnMasterDep, btnMasterDes, btnMasterEmp, btnMasterVac});

        pnlAll_HeadLayout.setVerticalGroup(
            pnlAll_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAll_HeadLayout.createSequentialGroup()
                .addGroup(pnlAll_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(btnMasterSec, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnMasterVac, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnMasterDes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnMasterEmp, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnMasterDep, javax.swing.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE)
                    .addComponent(btnMasterUser, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 0, Short.MAX_VALUE))
        );

        pnlAll_HeadLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnMasterDep, btnMasterDes, btnMasterEmp, btnMasterVac});

        pnlAll_Wellcome.setBackground(new java.awt.Color(255, 255, 255));
        pnlAll_Wellcome.setForeground(new java.awt.Color(255, 255, 255));

        btnEditUser.setBackground(new java.awt.Color(255, 255, 255));
        btnEditUser.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/logout-26.png"))); // NOI18N
        btnEditUser.setToolTipText("Log out");
        btnEditUser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditUserActionPerformed(evt);
            }
        });

        lblWellcome.setFont(new java.awt.Font("Segoe UI Light", 0, 12)); // NOI18N
        lblWellcome.setText("Wellcome");

        lblUser.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        lblUser.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblUser.setText("LINH");
        lblUser.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        lblAcclevel.setFont(new java.awt.Font("Segoe UI Light", 0, 12)); // NOI18N
        lblAcclevel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblAcclevel.setText("Access-level: Administrator");

        javax.swing.GroupLayout pnlAll_WellcomeLayout = new javax.swing.GroupLayout(pnlAll_Wellcome);
        pnlAll_Wellcome.setLayout(pnlAll_WellcomeLayout);
        pnlAll_WellcomeLayout.setHorizontalGroup(
            pnlAll_WellcomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAll_WellcomeLayout.createSequentialGroup()
                .addGroup(pnlAll_WellcomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlAll_WellcomeLayout.createSequentialGroup()
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(pnlAll_WellcomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlAll_WellcomeLayout.createSequentialGroup()
                                .addComponent(lblWellcome)
                                .addGap(26, 26, 26))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlAll_WellcomeLayout.createSequentialGroup()
                                .addComponent(lblUser, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                        .addComponent(btnEditUser, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlAll_WellcomeLayout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addComponent(lblAcclevel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pnlAll_WellcomeLayout.setVerticalGroup(
            pnlAll_WellcomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAll_WellcomeLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlAll_WellcomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnEditUser)
                    .addGroup(pnlAll_WellcomeLayout.createSequentialGroup()
                        .addComponent(lblWellcome)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblUser, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblAcclevel, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pnlAll_Body.setBackground(new java.awt.Color(255, 255, 255));
        pnlAll_Body.setForeground(new java.awt.Color(255, 255, 255));
        pnlAll_Body.setLayout(new java.awt.CardLayout());

        pnlAll_Body_Main.setBackground(new java.awt.Color(255, 255, 255));
        pnlAll_Body_Main.setForeground(new java.awt.Color(255, 255, 255));

        pnlAll_Body_Main_Head.setBackground(new java.awt.Color(255, 255, 255));
        pnlAll_Body_Main_Head.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlAll_Body_Main_Head.setLayout(new java.awt.CardLayout());

        pnlDepHead.setBackground(new java.awt.Color(0, 153, 255));
        pnlDepHead.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jlblDepCode.setBackground(new java.awt.Color(255, 255, 255));
        jlblDepCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        jlblDepCode.setForeground(new java.awt.Color(255, 255, 255));
        jlblDepCode.setText("Deparment No: ");

        txtDepInputCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        txtDepInputCode.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        txtDepInputCode.setMaximumSize(new java.awt.Dimension(6, 31));
        txtDepInputCode.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtDepInputCodeKeyReleased(evt);
            }
        });

        btnDepViewTable.setBackground(new java.awt.Color(255, 255, 255));
        btnDepViewTable.setText("...");
        btnDepViewTable.setToolTipText("View All Departments");
        btnDepViewTable.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDepViewTableActionPerformed(evt);
            }
        });

        btnDepStart.setBackground(new java.awt.Color(255, 255, 255));
        btnDepStart.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnDepStart.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/plus-32.png"))); // NOI18N
        btnDepStart.setText("INSERT");
        btnDepStart.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        btnDepStart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDepStartActionPerformed(evt);
            }
        });

        lblDepInsertCode.setBackground(new java.awt.Color(0, 153, 255));
        lblDepInsertCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        lblDepInsertCode.setForeground(new java.awt.Color(255, 255, 255));
        lblDepInsertCode.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblDepInsertCode.setText("INPUT CODE");

        lblDepCheckInputCode.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblDepCheckInputCode.setForeground(new java.awt.Color(255, 255, 255));
        lblDepCheckInputCode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblDepCheckInputCode.setText("jLabel6");

        javax.swing.GroupLayout pnlDepHeadLayout = new javax.swing.GroupLayout(pnlDepHead);
        pnlDepHead.setLayout(pnlDepHeadLayout);
        pnlDepHeadLayout.setHorizontalGroup(
            pnlDepHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDepHeadLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jlblDepCode, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDepHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lblDepCheckInputCode, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE)
                    .addComponent(txtDepInputCode, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnDepViewTable)
                .addGap(84, 84, 84)
                .addComponent(lblDepInsertCode, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 98, Short.MAX_VALUE)
                .addComponent(btnDepStart, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlDepHeadLayout.setVerticalGroup(
            pnlDepHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDepHeadLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblDepCheckInputCode)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDepHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(btnDepStart)
                    .addComponent(lblDepInsertCode)
                    .addComponent(txtDepInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnDepViewTable)
                    .addComponent(jlblDepCode))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        pnlDepHeadLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnDepViewTable, txtDepInputCode});

        pnlAll_Body_Main_Head.add(pnlDepHead, "card2");

        pnlEmpHead.setBackground(new java.awt.Color(0, 153, 255));
        pnlEmpHead.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jlbEmpCode.setBackground(new java.awt.Color(255, 255, 255));
        jlbEmpCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        jlbEmpCode.setForeground(new java.awt.Color(255, 255, 255));
        jlbEmpCode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jlbEmpCode.setText("Employee ID: ");

        txtEmpInputCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        txtEmpInputCode.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        txtEmpInputCode.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtEmpInputCodeKeyReleased(evt);
            }
        });

        btnEmpViewTable.setBackground(new java.awt.Color(255, 255, 255));
        btnEmpViewTable.setText("...");
        btnEmpViewTable.setToolTipText("View All Employees");
        btnEmpViewTable.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmpViewTableActionPerformed(evt);
            }
        });

        btnEmpStart.setBackground(new java.awt.Color(255, 255, 255));
        btnEmpStart.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnEmpStart.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/plus-32.png"))); // NOI18N
        btnEmpStart.setText("INSERT");
        btnEmpStart.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        btnEmpStart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmpStartActionPerformed(evt);
            }
        });

        lblEmpInsertCode.setBackground(new java.awt.Color(0, 153, 255));
        lblEmpInsertCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        lblEmpInsertCode.setForeground(new java.awt.Color(255, 255, 255));
        lblEmpInsertCode.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblEmpInsertCode.setText("INPUT CODE");

        lblEmpCheckInputCode.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblEmpCheckInputCode.setForeground(new java.awt.Color(255, 255, 255));
        lblEmpCheckInputCode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblEmpCheckInputCode.setText("jLabel6");

        javax.swing.GroupLayout pnlEmpHeadLayout = new javax.swing.GroupLayout(pnlEmpHead);
        pnlEmpHead.setLayout(pnlEmpHeadLayout);
        pnlEmpHeadLayout.setHorizontalGroup(
            pnlEmpHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEmpHeadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlEmpHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(pnlEmpHeadLayout.createSequentialGroup()
                        .addComponent(jlbEmpCode, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtEmpInputCode, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE))
                    .addComponent(lblEmpCheckInputCode, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnEmpViewTable)
                .addGap(84, 84, 84)
                .addComponent(lblEmpInsertCode, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 100, Short.MAX_VALUE)
                .addComponent(btnEmpStart, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlEmpHeadLayout.setVerticalGroup(
            pnlEmpHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEmpHeadLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblEmpCheckInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEmpHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jlbEmpCode)
                    .addComponent(txtEmpInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnEmpViewTable)
                    .addComponent(lblEmpInsertCode)
                    .addComponent(btnEmpStart))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        pnlEmpHeadLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnEmpViewTable, txtEmpInputCode});

        pnlAll_Body_Main_Head.add(pnlEmpHead, "card2");

        pnlDesHead.setBackground(new java.awt.Color(0, 153, 255));
        pnlDesHead.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jlblDesCode.setBackground(new java.awt.Color(255, 255, 255));
        jlblDesCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        jlblDesCode.setForeground(new java.awt.Color(255, 255, 255));
        jlblDesCode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jlblDesCode.setText("Designation ID: ");

        txtDesInputCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        txtDesInputCode.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        txtDesInputCode.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtDesInputCodeKeyReleased(evt);
            }
        });

        btnDesViewTable.setBackground(new java.awt.Color(255, 255, 255));
        btnDesViewTable.setText("...");
        btnDesViewTable.setToolTipText("View All Designations");
        btnDesViewTable.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDesViewTableActionPerformed(evt);
            }
        });

        btnDesStart.setBackground(new java.awt.Color(255, 255, 255));
        btnDesStart.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnDesStart.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/plus-32.png"))); // NOI18N
        btnDesStart.setText("INSERT");
        btnDesStart.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        btnDesStart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDesStartActionPerformed(evt);
            }
        });

        lblDesInsertCode.setBackground(new java.awt.Color(0, 153, 255));
        lblDesInsertCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        lblDesInsertCode.setForeground(new java.awt.Color(255, 255, 255));
        lblDesInsertCode.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblDesInsertCode.setText("INPUT CODE");

        lblDesCheckInputCode.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblDesCheckInputCode.setForeground(new java.awt.Color(255, 255, 255));
        lblDesCheckInputCode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblDesCheckInputCode.setText("jLabel6");

        javax.swing.GroupLayout pnlDesHeadLayout = new javax.swing.GroupLayout(pnlDesHead);
        pnlDesHead.setLayout(pnlDesHeadLayout);
        pnlDesHeadLayout.setHorizontalGroup(
            pnlDesHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDesHeadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDesHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(pnlDesHeadLayout.createSequentialGroup()
                        .addComponent(jlblDesCode, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtDesInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblDesCheckInputCode, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnDesViewTable)
                .addGap(84, 84, 84)
                .addComponent(lblDesInsertCode, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 100, Short.MAX_VALUE)
                .addComponent(btnDesStart, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlDesHeadLayout.setVerticalGroup(
            pnlDesHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDesHeadLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblDesCheckInputCode)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDesHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(btnDesStart)
                    .addComponent(lblDesInsertCode)
                    .addComponent(txtDesInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jlblDesCode)
                    .addComponent(btnDesViewTable))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        pnlDesHeadLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnDesViewTable, txtDesInputCode});

        pnlAll_Body_Main_Head.add(pnlDesHead, "card2");

        pnlVacHead.setBackground(new java.awt.Color(0, 153, 255));
        pnlVacHead.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jlbVacCode.setBackground(new java.awt.Color(255, 255, 255));
        jlbVacCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        jlbVacCode.setForeground(new java.awt.Color(255, 255, 255));
        jlbVacCode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jlbVacCode.setText("Vacancy ID: ");

        txtVacInputCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        txtVacInputCode.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        txtVacInputCode.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtVacInputCodeActionPerformed(evt);
            }
        });
        txtVacInputCode.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtVacInputCodeKeyReleased(evt);
            }
        });

        btnVacViewTable.setBackground(new java.awt.Color(255, 255, 255));
        btnVacViewTable.setText("...");
        btnVacViewTable.setToolTipText("View All Vacancies");
        btnVacViewTable.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacViewTableActionPerformed(evt);
            }
        });

        btnVacStart.setBackground(new java.awt.Color(255, 255, 255));
        btnVacStart.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnVacStart.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/plus-32.png"))); // NOI18N
        btnVacStart.setText("INSERT");
        btnVacStart.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        btnVacStart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacStartActionPerformed(evt);
            }
        });

        lblVacInsertCode.setBackground(new java.awt.Color(0, 153, 255));
        lblVacInsertCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        lblVacInsertCode.setForeground(new java.awt.Color(255, 255, 255));
        lblVacInsertCode.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblVacInsertCode.setText("INPUT CODE");

        lblVacCheckInputCode.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblVacCheckInputCode.setForeground(new java.awt.Color(255, 255, 255));
        lblVacCheckInputCode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblVacCheckInputCode.setText("jLabel6");

        javax.swing.GroupLayout pnlVacHeadLayout = new javax.swing.GroupLayout(pnlVacHead);
        pnlVacHead.setLayout(pnlVacHeadLayout);
        pnlVacHeadLayout.setHorizontalGroup(
            pnlVacHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlVacHeadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlVacHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(pnlVacHeadLayout.createSequentialGroup()
                        .addComponent(jlbVacCode, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtVacInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblVacCheckInputCode, javax.swing.GroupLayout.DEFAULT_SIZE, 354, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnVacViewTable)
                .addGap(84, 84, 84)
                .addComponent(lblVacInsertCode, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 100, Short.MAX_VALUE)
                .addComponent(btnVacStart, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlVacHeadLayout.setVerticalGroup(
            pnlVacHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlVacHeadLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblVacCheckInputCode)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlVacHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(btnVacStart)
                    .addComponent(lblVacInsertCode)
                    .addComponent(btnVacViewTable)
                    .addComponent(txtVacInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jlbVacCode))
                .addContainerGap())
        );

        pnlVacHeadLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnVacViewTable, txtVacInputCode});

        pnlAll_Body_Main_Head.add(pnlVacHead, "card2");

        pnlSecHead.setBackground(new java.awt.Color(0, 153, 255));
        pnlSecHead.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jlblUsername1.setBackground(new java.awt.Color(255, 255, 255));
        jlblUsername1.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        jlblUsername1.setForeground(new java.awt.Color(255, 255, 255));
        jlblUsername1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jlblUsername1.setText("Section ID:");

        txtSecInputCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        txtSecInputCode.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        txtSecInputCode.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtSecInputCodeKeyReleased(evt);
            }
        });

        btnSecViewTable.setBackground(new java.awt.Color(255, 255, 255));
        btnSecViewTable.setText("...");
        btnSecViewTable.setToolTipText("View All Sections");
        btnSecViewTable.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSecViewTableActionPerformed(evt);
            }
        });

        btnSecStart.setBackground(new java.awt.Color(255, 255, 255));
        btnSecStart.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnSecStart.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/plus-32.png"))); // NOI18N
        btnSecStart.setText("INSERT");
        btnSecStart.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        btnSecStart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSecStartActionPerformed(evt);
            }
        });

        lblSecInsertCode.setBackground(new java.awt.Color(0, 153, 255));
        lblSecInsertCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        lblSecInsertCode.setForeground(new java.awt.Color(255, 255, 255));
        lblSecInsertCode.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblSecInsertCode.setText("INPUT CODE");

        lblSecCheckInputCode.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblSecCheckInputCode.setForeground(new java.awt.Color(255, 255, 255));
        lblSecCheckInputCode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblSecCheckInputCode.setText("jLabel6");

        javax.swing.GroupLayout pnlSecHeadLayout = new javax.swing.GroupLayout(pnlSecHead);
        pnlSecHead.setLayout(pnlSecHeadLayout);
        pnlSecHeadLayout.setHorizontalGroup(
            pnlSecHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlSecHeadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlSecHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(pnlSecHeadLayout.createSequentialGroup()
                        .addComponent(jlblUsername1, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtSecInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblSecCheckInputCode, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSecViewTable)
                .addGap(84, 84, 84)
                .addComponent(lblSecInsertCode, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 100, Short.MAX_VALUE)
                .addComponent(btnSecStart, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlSecHeadLayout.setVerticalGroup(
            pnlSecHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlSecHeadLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblSecCheckInputCode)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlSecHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jlblUsername1)
                    .addComponent(txtSecInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnSecViewTable)
                    .addComponent(lblSecInsertCode)
                    .addComponent(btnSecStart))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        pnlSecHeadLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnSecViewTable, txtSecInputCode});

        pnlAll_Body_Main_Head.add(pnlSecHead, "card2");

        pnlUserHead.setBackground(new java.awt.Color(0, 153, 255));
        pnlUserHead.setToolTipText("");
        pnlUserHead.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jlblUsername.setBackground(new java.awt.Color(255, 255, 255));
        jlblUsername.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        jlblUsername.setForeground(new java.awt.Color(255, 255, 255));
        jlblUsername.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jlblUsername.setText("Username:");

        txtUserInputCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        txtUserInputCode.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        txtUserInputCode.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtUserInputCodeKeyReleased(evt);
            }
        });

        btnUserViewTable.setBackground(new java.awt.Color(255, 255, 255));
        btnUserViewTable.setText("...");
        btnUserViewTable.setToolTipText("View All User Accounts");
        btnUserViewTable.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUserViewTableActionPerformed(evt);
            }
        });

        btnUserStart.setBackground(new java.awt.Color(255, 255, 255));
        btnUserStart.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnUserStart.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/plus-32.png"))); // NOI18N
        btnUserStart.setText("INSERT");
        btnUserStart.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        btnUserStart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUserStartActionPerformed(evt);
            }
        });

        lblUserInsertCode.setBackground(new java.awt.Color(0, 153, 255));
        lblUserInsertCode.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        lblUserInsertCode.setForeground(new java.awt.Color(255, 255, 255));
        lblUserInsertCode.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblUserInsertCode.setText("INPUT CODE");

        lblUserCheckInputCode.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblUserCheckInputCode.setForeground(new java.awt.Color(255, 255, 255));
        lblUserCheckInputCode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblUserCheckInputCode.setText("jLabel6");

        javax.swing.GroupLayout pnlUserHeadLayout = new javax.swing.GroupLayout(pnlUserHead);
        pnlUserHead.setLayout(pnlUserHeadLayout);
        pnlUserHeadLayout.setHorizontalGroup(
            pnlUserHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlUserHeadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlUserHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(pnlUserHeadLayout.createSequentialGroup()
                        .addComponent(jlblUsername, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtUserInputCode, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE))
                    .addComponent(lblUserCheckInputCode, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnUserViewTable)
                .addGap(84, 84, 84)
                .addComponent(lblUserInsertCode, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 98, Short.MAX_VALUE)
                .addComponent(btnUserStart, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlUserHeadLayout.setVerticalGroup(
            pnlUserHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlUserHeadLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblUserCheckInputCode)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlUserHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(btnUserStart)
                    .addComponent(lblUserInsertCode)
                    .addComponent(btnUserViewTable)
                    .addComponent(txtUserInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jlblUsername))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        pnlUserHeadLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnUserViewTable, txtUserInputCode});

        pnlAll_Body_Main_Head.add(pnlUserHead, "card2");

        pnlAll_Body_Main_Bottom.setBackground(new java.awt.Color(255, 255, 255));
        pnlAll_Body_Main_Bottom.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlAll_Body_Main_Bottom.setLayout(new java.awt.CardLayout());

        pnlDepBody.setBackground(new java.awt.Color(255, 255, 255));
        pnlDepBody.setLayout(new java.awt.CardLayout());

        pnlDepInfor.setBackground(new java.awt.Color(255, 255, 255));

        jLabel89.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jLabel89.setText("DEPARTMENT INFORMATION");

        jLabel96.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel96.setText("DEPARTMENT NO:");

        jLabel97.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel97.setText("DEPARTMENT NAME:");

        jLabel98.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel98.setText("DEPARTMENT HEAD:");

        jLabel99.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel99.setText("LOCATION:");

        txtDepNo.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        txtDepNo.setEnabled(false);

        txtDepName.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N

        txtDepHead.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N

        txtDepLocation.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N

        btnDepInsert.setBackground(new java.awt.Color(0, 153, 255));
        btnDepInsert.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnDepInsert.setForeground(new java.awt.Color(255, 255, 255));
        btnDepInsert.setText("INSERT");
        btnDepInsert.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDepInsertActionPerformed(evt);
            }
        });

        btnDepReset.setBackground(new java.awt.Color(0, 153, 255));
        btnDepReset.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnDepReset.setForeground(new java.awt.Color(255, 255, 255));
        btnDepReset.setText("RESET");
        btnDepReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDepResetActionPerformed(evt);
            }
        });

        btnDepCancel.setBackground(new java.awt.Color(0, 153, 255));
        btnDepCancel.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnDepCancel.setForeground(new java.awt.Color(255, 255, 255));
        btnDepCancel.setText("CANCEL");
        btnDepCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDepCancelActionPerformed(evt);
            }
        });

        lblDepNoCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblDepNoCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblDepNoCheck.setText("jLabel2");

        lblDepNameCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblDepNameCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblDepNameCheck.setText("jLabel3");

        lblDepHeadCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblDepHeadCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblDepHeadCheck.setText("jLabel4");

        lblDepLocalCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblDepLocalCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblDepLocalCheck.setText("jLabel5");

        javax.swing.GroupLayout pnlDepInforLayout = new javax.swing.GroupLayout(pnlDepInfor);
        pnlDepInfor.setLayout(pnlDepInforLayout);
        pnlDepInforLayout.setHorizontalGroup(
            pnlDepInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDepInforLayout.createSequentialGroup()
                .addGroup(pnlDepInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlDepInforLayout.createSequentialGroup()
                        .addGap(281, 281, 281)
                        .addComponent(btnDepInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(btnDepReset, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(btnDepCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlDepInforLayout.createSequentialGroup()
                        .addGap(206, 206, 206)
                        .addGroup(pnlDepInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlDepInforLayout.createSequentialGroup()
                                .addGroup(pnlDepInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel99, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel98, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel97, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel96, javax.swing.GroupLayout.Alignment.TRAILING))
                                .addGap(17, 17, 17)
                                .addGroup(pnlDepInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblDepLocalCheck)
                                    .addComponent(txtDepLocation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblDepHeadCheck)
                                    .addComponent(txtDepHead, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblDepNameCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 340, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtDepName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblDepNoCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtDepNo, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(jLabel89))))
                .addContainerGap(239, Short.MAX_VALUE))
        );

        pnlDepInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {txtDepHead, txtDepLocation, txtDepName, txtDepNo});

        pnlDepInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnDepCancel, btnDepInsert, btnDepReset});

        pnlDepInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {lblDepHeadCheck, lblDepLocalCheck});

        pnlDepInforLayout.setVerticalGroup(
            pnlDepInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDepInforLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel89)
                .addGap(18, 18, 18)
                .addGroup(pnlDepInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtDepNo, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel96))
                .addGap(5, 5, 5)
                .addComponent(lblDepNoCheck)
                .addGap(18, 18, 18)
                .addGroup(pnlDepInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtDepName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel97))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblDepNameCheck)
                .addGap(18, 18, 18)
                .addGroup(pnlDepInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtDepHead, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel98))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblDepHeadCheck)
                .addGap(18, 18, 18)
                .addGroup(pnlDepInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtDepLocation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel99))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblDepLocalCheck)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 64, Short.MAX_VALUE)
                .addGroup(pnlDepInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnDepInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnDepReset, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnDepCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlDepInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {txtDepHead, txtDepLocation, txtDepName, txtDepNo});

        pnlDepInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnDepCancel, btnDepInsert, btnDepReset});

        pnlDepBody.add(pnlDepInfor, "card2");

        pnlDepTable.setBackground(new java.awt.Color(255, 255, 255));

        jScrollPane1.setBackground(new java.awt.Color(255, 255, 255));

        tblDep.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        tblDep.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tblDep.setUpdateSelectionOnSort(false);
        tblDep.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblDepMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(tblDep);

        jPanel1.setBackground(new java.awt.Color(204, 0, 0));

        jLabel2.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("SELECT A DEPARTMENT TO EDIT");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(179, 179, 179)
                .addComponent(jLabel2)
                .addContainerGap(254, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btnDepTableCancel.setBackground(new java.awt.Color(255, 255, 255));
        btnDepTableCancel.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        btnDepTableCancel.setText("Cancel");
        btnDepTableCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDepTableCancelActionPerformed(evt);
            }
        });

        btnDepTableOk.setBackground(new java.awt.Color(255, 255, 255));
        btnDepTableOk.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        btnDepTableOk.setText("Ok");
        btnDepTableOk.setEnabled(false);
        btnDepTableOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDepTableOkActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlDepTableLayout = new javax.swing.GroupLayout(pnlDepTable);
        pnlDepTable.setLayout(pnlDepTableLayout);
        pnlDepTableLayout.setHorizontalGroup(
            pnlDepTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 934, Short.MAX_VALUE)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDepTableLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(btnDepTableOk)
                .addGap(18, 18, 18)
                .addComponent(btnDepTableCancel))
        );

        pnlDepTableLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnDepTableCancel, btnDepTableOk});

        pnlDepTableLayout.setVerticalGroup(
            pnlDepTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDepTableLayout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDepTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnDepTableCancel)
                    .addComponent(btnDepTableOk, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(36, Short.MAX_VALUE))
        );

        pnlDepTableLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnDepTableCancel, btnDepTableOk});

        pnlDepBody.add(pnlDepTable, "card2");

        pnlAll_Body_Main_Bottom.add(pnlDepBody, "card2");

        pnlEmpBody.setBackground(new java.awt.Color(255, 255, 255));
        pnlEmpBody.setLayout(new java.awt.CardLayout());

        pnlEmpInfor.setBackground(new java.awt.Color(255, 255, 255));

        jTitleEmpInfo.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jTitleEmpInfo.setText("EMPLOYEE INFORMATION");

        jLabel101.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel101.setText("EMPLOYEE ID:");

        jLabel102.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel102.setText("EMPLOYEE NAME:");

        jLabel103.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel103.setText("DEPARTMENT NO:");

        jLabel104.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel104.setText("DESIGNATION ID:");

        jLabel106.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel106.setText("ADDRESS:");

        jLabel107.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel107.setText("PHONE:");

        jLabel108.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel108.setText("FAX:");

        jLabel109.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel109.setText("EMAIL:");

        jLabel105.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel105.setText("SECTION ID:");

        txtEmpId.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N

        txtEmpName.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N

        cbEmpDepNo.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        cbEmpDepNo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        cbEmpDesId.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        cbEmpDesId.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        cbEmpSecId.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        cbEmpSecId.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        txtEmpAddress.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N

        txtEmpPhone.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N

        txtEmpFax.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N

        txtEmpEmail.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N

        lblEmpIdCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblEmpIdCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblEmpIdCheck.setText("jLabel2");
        lblEmpIdCheck.setEnabled(false);

        lblEmpNameCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblEmpNameCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblEmpNameCheck.setText("jLabel3");

        lblEmpDepNoCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblEmpDepNoCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblEmpDepNoCheck.setText("jLabel3");

        lblEmpDesIdCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblEmpDesIdCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblEmpDesIdCheck.setText("jLabel3");

        lblEmpSecIdCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblEmpSecIdCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblEmpSecIdCheck.setText("jLabel3");

        lblEmpAddressCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblEmpAddressCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblEmpAddressCheck.setText("jLabel2");

        lblEmpPhoneCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblEmpPhoneCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblEmpPhoneCheck.setText("jLabel3");

        lblEmpFaxCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblEmpFaxCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblEmpFaxCheck.setText("jLabel5");

        lblEmpEmailCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblEmpEmailCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblEmpEmailCheck.setText("jLabel4");

        btnEmpInsert.setBackground(new java.awt.Color(0, 153, 255));
        btnEmpInsert.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnEmpInsert.setForeground(new java.awt.Color(255, 255, 255));
        btnEmpInsert.setText("INSERT");
        btnEmpInsert.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmpInsertActionPerformed(evt);
            }
        });

        btnEmpReset.setBackground(new java.awt.Color(0, 153, 255));
        btnEmpReset.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnEmpReset.setForeground(new java.awt.Color(255, 255, 255));
        btnEmpReset.setText("RESET");
        btnEmpReset.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
        btnEmpReset.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnEmpReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmpResetActionPerformed(evt);
            }
        });

        btnEmpCancel.setBackground(new java.awt.Color(0, 153, 255));
        btnEmpCancel.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnEmpCancel.setForeground(new java.awt.Color(255, 255, 255));
        btnEmpCancel.setText("CANCEL");
        btnEmpCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmpCancelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlEmpInforLayout = new javax.swing.GroupLayout(pnlEmpInfor);
        pnlEmpInfor.setLayout(pnlEmpInforLayout);
        pnlEmpInforLayout.setHorizontalGroup(
            pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlEmpInforLayout.createSequentialGroup()
                .addContainerGap(303, Short.MAX_VALUE)
                .addComponent(jTitleEmpInfo)
                .addGap(225, 225, 225))
            .addGroup(pnlEmpInforLayout.createSequentialGroup()
                .addGap(46, 46, 46)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel101, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel102, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel103, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel104, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel105, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(17, 17, 17)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lblEmpSecIdCheck, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblEmpIdCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblEmpDesIdCheck, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblEmpDepNoCheck, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(txtEmpName, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE)
                    .addComponent(cbEmpDesId, 0, 86, Short.MAX_VALUE)
                    .addComponent(cbEmpDepNo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(cbEmpSecId, 0, 142, Short.MAX_VALUE)
                    .addComponent(lblEmpNameCheck, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(txtEmpId, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)))
            .addGroup(pnlEmpInforLayout.createSequentialGroup()
                .addGap(281, 281, 281)
                .addComponent(btnEmpInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnEmpReset, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlEmpInforLayout.createSequentialGroup()
                        .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel106, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel107, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel108, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel109, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addGap(18, 18, 18)
                        .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtEmpFax)
                            .addComponent(txtEmpEmail)
                            .addComponent(lblEmpAddressCheck, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtEmpAddress)
                            .addComponent(lblEmpPhoneCheck, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtEmpPhone)
                            .addComponent(lblEmpFaxCheck, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblEmpEmailCheck, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addComponent(btnEmpCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        pnlEmpInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnEmpCancel, btnEmpInsert, btnEmpReset});

        pnlEmpInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cbEmpDepNo, cbEmpDesId, cbEmpSecId, txtEmpAddress, txtEmpEmail, txtEmpFax, txtEmpId, txtEmpName, txtEmpPhone});

        pnlEmpInforLayout.setVerticalGroup(
            pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEmpInforLayout.createSequentialGroup()
                .addComponent(jTitleEmpInfo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel101)
                    .addComponent(txtEmpId, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel106)
                    .addComponent(txtEmpAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblEmpAddressCheck)
                    .addComponent(lblEmpIdCheck))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtEmpPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel107)
                    .addComponent(txtEmpName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel102))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEmpNameCheck)
                    .addComponent(lblEmpPhoneCheck))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtEmpFax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel108)
                    .addComponent(cbEmpDepNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel103))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEmpFaxCheck)
                    .addComponent(lblEmpDepNoCheck))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtEmpEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel109)
                    .addComponent(cbEmpDesId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel104))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEmpEmailCheck)
                    .addComponent(lblEmpDesIdCheck))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel105)
                    .addComponent(cbEmpSecId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addComponent(lblEmpSecIdCheck)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE)
                .addGroup(pnlEmpInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnEmpReset, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnEmpInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnEmpCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlEmpInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {cbEmpDepNo, cbEmpDesId, cbEmpSecId, txtEmpAddress, txtEmpEmail, txtEmpFax, txtEmpId, txtEmpName, txtEmpPhone});

        pnlEmpInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnEmpCancel, btnEmpInsert, btnEmpReset});

        pnlEmpBody.add(pnlEmpInfor, "card2");

        pnlEmpTable.setBackground(new java.awt.Color(255, 255, 255));

        jScrollPane2.setBackground(new java.awt.Color(255, 255, 255));

        tblEmp.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        tblEmp.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tblEmp.setUpdateSelectionOnSort(false);
        tblEmp.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblEmpMouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(tblEmp);

        jPanel2.setBackground(new java.awt.Color(204, 0, 0));

        jLabel3.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setText("SELECT AN EMPLOYEE TO EDIT");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(193, 193, 193)
                .addComponent(jLabel3)
                .addContainerGap(263, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btnEmpTableOk.setBackground(new java.awt.Color(255, 255, 255));
        btnEmpTableOk.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        btnEmpTableOk.setText("Ok");
        btnEmpTableOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmpTableOkActionPerformed(evt);
            }
        });

        btnEmpTableCancel.setBackground(new java.awt.Color(255, 255, 255));
        btnEmpTableCancel.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        btnEmpTableCancel.setText("Cancel");
        btnEmpTableCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmpTableCancelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlEmpTableLayout = new javax.swing.GroupLayout(pnlEmpTable);
        pnlEmpTable.setLayout(pnlEmpTableLayout);
        pnlEmpTableLayout.setHorizontalGroup(
            pnlEmpTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 934, Short.MAX_VALUE)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlEmpTableLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(btnEmpTableOk)
                .addGap(18, 18, 18)
                .addComponent(btnEmpTableCancel))
        );

        pnlEmpTableLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnEmpTableCancel, btnEmpTableOk});

        pnlEmpTableLayout.setVerticalGroup(
            pnlEmpTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlEmpTableLayout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEmpTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnEmpTableCancel)
                    .addComponent(btnEmpTableOk, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(36, Short.MAX_VALUE))
        );

        pnlEmpTableLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnEmpTableCancel, btnEmpTableOk});

        pnlEmpBody.add(pnlEmpTable, "card2");

        pnlAll_Body_Main_Bottom.add(pnlEmpBody, "card2");

        pnlDesBody.setBackground(new java.awt.Color(255, 255, 255));
        pnlDesBody.setLayout(new java.awt.CardLayout());

        pnlDesInfor.setBackground(new java.awt.Color(255, 255, 255));

        jLabel90.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jLabel90.setText("DESIGNATION INFORMATION");

        jLabel110.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel110.setText("DESIGNATION ID:");

        jLabel111.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel111.setText("DESIGNATION NAME:");

        txtDesId.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N

        txtDesName.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N

        btnDesInsert.setBackground(new java.awt.Color(0, 153, 255));
        btnDesInsert.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnDesInsert.setForeground(new java.awt.Color(255, 255, 255));
        btnDesInsert.setText("INSERT");
        btnDesInsert.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDesInsertActionPerformed(evt);
            }
        });

        btnDesReset.setBackground(new java.awt.Color(0, 153, 255));
        btnDesReset.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnDesReset.setForeground(new java.awt.Color(255, 255, 255));
        btnDesReset.setText("RESET");
        btnDesReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDesResetActionPerformed(evt);
            }
        });

        btnDesCancel.setBackground(new java.awt.Color(0, 153, 255));
        btnDesCancel.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnDesCancel.setForeground(new java.awt.Color(255, 255, 255));
        btnDesCancel.setText("CANCEL");
        btnDesCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDesCancelActionPerformed(evt);
            }
        });

        lblDesIdCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblDesIdCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblDesIdCheck.setText("jLabel2");

        lblDesNameCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblDesNameCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblDesNameCheck.setText("jLabel3");

        javax.swing.GroupLayout pnlDesInforLayout = new javax.swing.GroupLayout(pnlDesInfor);
        pnlDesInfor.setLayout(pnlDesInforLayout);
        pnlDesInforLayout.setHorizontalGroup(
            pnlDesInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDesInforLayout.createSequentialGroup()
                .addGroup(pnlDesInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlDesInforLayout.createSequentialGroup()
                        .addGap(206, 206, 206)
                        .addGroup(pnlDesInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel111, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel110, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addGap(17, 17, 17)
                        .addGroup(pnlDesInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblDesNameCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 340, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtDesName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblDesIdCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtDesId, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlDesInforLayout.createSequentialGroup()
                        .addGap(206, 206, 206)
                        .addComponent(jLabel90))
                    .addGroup(pnlDesInforLayout.createSequentialGroup()
                        .addGap(281, 281, 281)
                        .addComponent(btnDesInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(btnDesReset, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(btnDesCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(236, Short.MAX_VALUE))
        );

        pnlDesInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {txtDesId, txtDesName});

        pnlDesInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {lblDesIdCheck, lblDesNameCheck});

        pnlDesInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnDesCancel, btnDesInsert, btnDesReset});

        pnlDesInforLayout.setVerticalGroup(
            pnlDesInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDesInforLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel90)
                .addGap(55, 55, 55)
                .addGroup(pnlDesInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtDesId, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel110))
                .addGap(5, 5, 5)
                .addComponent(lblDesIdCheck)
                .addGap(18, 18, 18)
                .addGroup(pnlDesInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtDesName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel111))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblDesNameCheck)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 173, Short.MAX_VALUE)
                .addGroup(pnlDesInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnDesInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnDesReset, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnDesCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlDesInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {txtDesId, txtDesName});

        pnlDesInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnDesCancel, btnDesInsert, btnDesReset});

        pnlDesBody.add(pnlDesInfor, "card2");

        pnlDesTable.setBackground(new java.awt.Color(255, 255, 255));

        jScrollPane3.setBackground(new java.awt.Color(255, 255, 255));

        tblDes.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        tblDes.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tblDes.setUpdateSelectionOnSort(false);
        tblDes.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblDesMouseClicked(evt);
            }
        });
        jScrollPane3.setViewportView(tblDes);

        jPanel3.setBackground(new java.awt.Color(204, 0, 0));

        jlblSelectDes.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jlblSelectDes.setForeground(new java.awt.Color(255, 255, 255));
        jlblSelectDes.setText("SELECT A DESIGNATION TO EDIT");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(179, 179, 179)
                .addComponent(jlblSelectDes)
                .addContainerGap(249, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jlblSelectDes)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btnDesTableOk.setBackground(new java.awt.Color(255, 255, 255));
        btnDesTableOk.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        btnDesTableOk.setText("Ok");
        btnDesTableOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDesTableOkActionPerformed(evt);
            }
        });

        btnDesTableCancel.setBackground(new java.awt.Color(255, 255, 255));
        btnDesTableCancel.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        btnDesTableCancel.setText("Cancel");
        btnDesTableCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDesTableCancelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlDesTableLayout = new javax.swing.GroupLayout(pnlDesTable);
        pnlDesTable.setLayout(pnlDesTableLayout);
        pnlDesTableLayout.setHorizontalGroup(
            pnlDesTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 934, Short.MAX_VALUE)
            .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDesTableLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(btnDesTableOk)
                .addGap(18, 18, 18)
                .addComponent(btnDesTableCancel))
        );

        pnlDesTableLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnDesTableCancel, btnDesTableOk});

        pnlDesTableLayout.setVerticalGroup(
            pnlDesTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDesTableLayout.createSequentialGroup()
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDesTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnDesTableCancel)
                    .addComponent(btnDesTableOk, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(36, Short.MAX_VALUE))
        );

        pnlDesTableLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnDesTableCancel, btnDesTableOk});

        pnlDesBody.add(pnlDesTable, "card2");

        pnlAll_Body_Main_Bottom.add(pnlDesBody, "card2");

        pnlVacBody.setBackground(new java.awt.Color(255, 255, 255));
        pnlVacBody.setLayout(new java.awt.CardLayout());

        pnlVacInfor.setBackground(new java.awt.Color(255, 255, 255));

        jTitleEmpInfo1.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jTitleEmpInfo1.setText("VACANCY INFORMATION");

        jLabel112.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel112.setText("VACANCY ID:");

        jLabel113.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel113.setText("DEPARTMENT NO:");

        jLabel114.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel114.setText("SECTION ID:");

        jLabel115.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel115.setText("DESIGNATION ID:");

        jLabel116.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel116.setText("NO OF VACANCY:");

        jLabel117.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel117.setText("STATUS:");

        jLabel118.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel118.setText("VACANCY DATE:");

        jLabel119.setFont(new java.awt.Font("Segoe UI", 0, 13)); // NOI18N
        jLabel119.setText("PRIORITY:");

        txtVacId.setFont(new java.awt.Font("Segoe UI", 1, 13)); // NOI18N

        cbVacDepNo.setFont(new java.awt.Font("Segoe UI", 1, 13)); // NOI18N
        cbVacDepNo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        cbVacSecId.setFont(new java.awt.Font("Segoe UI", 1, 13)); // NOI18N
        cbVacSecId.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        cbVacDesId.setFont(new java.awt.Font("Segoe UI", 1, 13)); // NOI18N
        cbVacDesId.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        txtVacNoOf.setFont(new java.awt.Font("Segoe UI", 1, 13)); // NOI18N

        cbVacStatus.setFont(new java.awt.Font("Segoe UI", 1, 13)); // NOI18N
        cbVacStatus.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3" }));

        txtVacDate.setFont(new java.awt.Font("Segoe UI", 1, 13)); // NOI18N

        txtVacPriority.setFont(new java.awt.Font("Segoe UI", 1, 13)); // NOI18N

        lblVacIdCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblVacIdCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblVacIdCheck.setText("jLabel2");
        lblVacIdCheck.setEnabled(false);

        lblVacDepNoCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblVacDepNoCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblVacDepNoCheck.setText("jLabel3");

        lblVacSecIdCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblVacSecIdCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblVacSecIdCheck.setText("jLabel3");

        lblVacDesIdCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblVacDesIdCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblVacDesIdCheck.setText("jLabel3");

        lblVacNoOfCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblVacNoOfCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblVacNoOfCheck.setText("jLabel2");

        lblVacStatusCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblVacStatusCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblVacStatusCheck.setText("jLabel3");

        lblVacDateCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblVacDateCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblVacDateCheck.setText("jLabel5");

        lblVacPriorityCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblVacPriorityCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblVacPriorityCheck.setText("jLabel4");

        btnVacInsert.setBackground(new java.awt.Color(0, 153, 255));
        btnVacInsert.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnVacInsert.setForeground(new java.awt.Color(255, 255, 255));
        btnVacInsert.setText("INSERT");
        btnVacInsert.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacInsertActionPerformed(evt);
            }
        });

        btnVacReset.setBackground(new java.awt.Color(0, 153, 255));
        btnVacReset.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnVacReset.setForeground(new java.awt.Color(255, 255, 255));
        btnVacReset.setText("RESET");
        btnVacReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacResetActionPerformed(evt);
            }
        });

        btnVacCancel.setBackground(new java.awt.Color(0, 153, 255));
        btnVacCancel.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnVacCancel.setForeground(new java.awt.Color(255, 255, 255));
        btnVacCancel.setText("CANCEL");
        btnVacCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacCancelActionPerformed(evt);
            }
        });

        btnVacPickDate.setBackground(new java.awt.Color(255, 255, 255));
        btnVacPickDate.setText("...");
        btnVacPickDate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacPickDateActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlVacInforLayout = new javax.swing.GroupLayout(pnlVacInfor);
        pnlVacInfor.setLayout(pnlVacInforLayout);
        pnlVacInforLayout.setHorizontalGroup(
            pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlVacInforLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jTitleEmpInfo1)
                .addGap(225, 225, 225))
            .addGroup(pnlVacInforLayout.createSequentialGroup()
                .addGap(281, 281, 281)
                .addComponent(btnVacInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnVacReset, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnVacCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(pnlVacInforLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel115, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel114, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel113, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel112, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtVacId, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblVacIdCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblVacDepNoCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cbVacDepNo, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cbVacSecId, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblVacSecIdCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cbVacDesId, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblVacDesIdCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 129, Short.MAX_VALUE)
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel116, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel117, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel118, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel119, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(18, 18, 18)
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(txtVacPriority, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(lblVacPriorityCheck)
                        .addComponent(lblVacDateCheck)
                        .addGroup(pnlVacInforLayout.createSequentialGroup()
                            .addComponent(txtVacDate, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(btnVacPickDate, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(lblVacStatusCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cbVacStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtVacNoOf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblVacNoOfCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 236, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(42, 42, 42))
        );

        pnlVacInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cbVacDepNo, cbVacDesId, cbVacSecId, cbVacStatus, lblVacDateCheck, lblVacDepNoCheck, lblVacDesIdCheck, lblVacIdCheck, lblVacNoOfCheck, lblVacPriorityCheck, lblVacSecIdCheck, lblVacStatusCheck, txtVacId, txtVacNoOf, txtVacPriority});

        pnlVacInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnVacCancel, btnVacInsert, btnVacReset});

        pnlVacInforLayout.setVerticalGroup(
            pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlVacInforLayout.createSequentialGroup()
                .addComponent(jTitleEmpInfo1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel112)
                    .addComponent(txtVacId, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel116)
                    .addComponent(txtVacNoOf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblVacNoOfCheck)
                    .addComponent(lblVacIdCheck))
                .addGap(18, 18, 18)
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel117)
                    .addComponent(jLabel113)
                    .addComponent(cbVacDepNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cbVacStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblVacDepNoCheck)
                    .addComponent(lblVacStatusCheck))
                .addGap(18, 18, 18)
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtVacDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel118)
                    .addComponent(cbVacSecId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel114)
                    .addComponent(btnVacPickDate))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblVacDateCheck)
                    .addComponent(lblVacSecIdCheck))
                .addGap(18, 18, 18)
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtVacPriority, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel119)
                    .addComponent(cbVacDesId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel115))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblVacPriorityCheck)
                    .addComponent(lblVacDesIdCheck))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 85, Short.MAX_VALUE)
                .addGroup(pnlVacInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnVacInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnVacReset, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnVacCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlVacInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnVacPickDate, cbVacDepNo, cbVacDesId, cbVacSecId, cbVacStatus, txtVacDate, txtVacId, txtVacNoOf, txtVacPriority});

        pnlVacInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnVacCancel, btnVacInsert, btnVacReset});

        pnlVacBody.add(pnlVacInfor, "card2");

        pnlVacTable.setBackground(new java.awt.Color(255, 255, 255));

        jScrollPane4.setBackground(new java.awt.Color(255, 255, 255));

        tblVac.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        tblVac.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tblVac.setUpdateSelectionOnSort(false);
        tblVac.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblVacMouseClicked(evt);
            }
        });
        jScrollPane4.setViewportView(tblVac);

        jPanel4.setBackground(new java.awt.Color(204, 0, 0));

        jLabel4.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jLabel4.setForeground(new java.awt.Color(255, 255, 255));
        jLabel4.setText("SELECT A VACANCY TO EDIT");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(193, 193, 193)
                .addComponent(jLabel4)
                .addContainerGap(298, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel4)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btnVacTableOk.setBackground(new java.awt.Color(255, 255, 255));
        btnVacTableOk.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        btnVacTableOk.setText("Ok");
        btnVacTableOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacTableOkActionPerformed(evt);
            }
        });

        btnVacTableCancel.setBackground(new java.awt.Color(255, 255, 255));
        btnVacTableCancel.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        btnVacTableCancel.setText("Cancel");
        btnVacTableCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacTableCancelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlVacTableLayout = new javax.swing.GroupLayout(pnlVacTable);
        pnlVacTable.setLayout(pnlVacTableLayout);
        pnlVacTableLayout.setHorizontalGroup(
            pnlVacTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 934, Short.MAX_VALUE)
            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlVacTableLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(btnVacTableOk)
                .addGap(18, 18, 18)
                .addComponent(btnVacTableCancel))
        );

        pnlVacTableLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnVacTableCancel, btnVacTableOk});

        pnlVacTableLayout.setVerticalGroup(
            pnlVacTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlVacTableLayout.createSequentialGroup()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlVacTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnVacTableCancel)
                    .addComponent(btnVacTableOk, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(36, Short.MAX_VALUE))
        );

        pnlVacTableLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnVacTableCancel, btnVacTableOk});

        pnlVacBody.add(pnlVacTable, "card2");

        pnlAll_Body_Main_Bottom.add(pnlVacBody, "card2");

        pnlSecBody.setBackground(new java.awt.Color(255, 255, 255));
        pnlSecBody.setLayout(new java.awt.CardLayout());

        pnlSecInfor.setBackground(new java.awt.Color(255, 255, 255));

        jLabel92.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jLabel92.setText("SECTION INFORMATION");

        jLabel124.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel124.setText("SECTION ID:");

        jLabel125.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel125.setText("SECTION NAME:");

        jLabel126.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel126.setText("DEPARTMENT NO:");

        jLabel128.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel128.setText("SECTION INCHARGE");

        txtSecId.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        txtSecId.setEnabled(false);

        txtSecName.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        txtSecName.setEnabled(false);

        txtSecInch.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        txtSecInch.setEnabled(false);

        cbSecDepNo.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        cbSecDepNo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        lblSecIdCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblSecIdCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblSecIdCheck.setText("jLabel2");

        lblSecNameCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblSecNameCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblSecNameCheck.setText("jLabel3");

        lblSecDepNoCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblSecDepNoCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblSecDepNoCheck.setText("jLabel4");

        lblSecInchCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblSecInchCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblSecInchCheck.setText("jLabel3");

        btnSecInsert.setBackground(new java.awt.Color(0, 153, 255));
        btnSecInsert.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnSecInsert.setForeground(new java.awt.Color(255, 255, 255));
        btnSecInsert.setText("INSERT");
        btnSecInsert.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSecInsertActionPerformed(evt);
            }
        });

        btnSecReset.setBackground(new java.awt.Color(0, 153, 255));
        btnSecReset.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnSecReset.setForeground(new java.awt.Color(255, 255, 255));
        btnSecReset.setText("RESET");
        btnSecReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSecResetActionPerformed(evt);
            }
        });

        btnSecCancel.setBackground(new java.awt.Color(0, 153, 255));
        btnSecCancel.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnSecCancel.setForeground(new java.awt.Color(255, 255, 255));
        btnSecCancel.setText("CANCEL");
        btnSecCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSecCancelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlSecInforLayout = new javax.swing.GroupLayout(pnlSecInfor);
        pnlSecInfor.setLayout(pnlSecInforLayout);
        pnlSecInforLayout.setHorizontalGroup(
            pnlSecInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlSecInforLayout.createSequentialGroup()
                .addGroup(pnlSecInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlSecInforLayout.createSequentialGroup()
                        .addGap(281, 281, 281)
                        .addComponent(btnSecInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(btnSecReset, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(btnSecCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlSecInforLayout.createSequentialGroup()
                        .addGap(257, 257, 257)
                        .addGroup(pnlSecInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlSecInforLayout.createSequentialGroup()
                                .addGap(19, 19, 19)
                                .addComponent(jLabel92))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlSecInforLayout.createSequentialGroup()
                                .addGroup(pnlSecInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel124, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel125, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel126, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel128, javax.swing.GroupLayout.Alignment.TRAILING))
                                .addGap(18, 18, 18)
                                .addGroup(pnlSecInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtSecName, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtSecInch, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(cbSecDepNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblSecNameCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblSecDepNoCheck)
                                    .addComponent(lblSecInchCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblSecIdCheck, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(txtSecId, javax.swing.GroupLayout.DEFAULT_SIZE, 222, Short.MAX_VALUE))))))
                .addContainerGap(257, Short.MAX_VALUE))
        );

        pnlSecInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cbSecDepNo, lblSecDepNoCheck, lblSecIdCheck, lblSecInchCheck, lblSecNameCheck, txtSecId, txtSecInch, txtSecName});

        pnlSecInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnSecCancel, btnSecInsert, btnSecReset});

        pnlSecInforLayout.setVerticalGroup(
            pnlSecInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlSecInforLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel92)
                .addGap(29, 29, 29)
                .addGroup(pnlSecInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtSecId, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel124))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblSecIdCheck)
                .addGap(23, 23, 23)
                .addGroup(pnlSecInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtSecName, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel125))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblSecNameCheck)
                .addGap(30, 30, 30)
                .addGroup(pnlSecInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtSecInch, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel128))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblSecInchCheck)
                .addGap(18, 18, 18)
                .addGroup(pnlSecInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(cbSecDepNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel126))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblSecDepNoCheck)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)
                .addGroup(pnlSecInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnSecInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnSecReset, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnSecCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlSecInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {cbSecDepNo, txtSecId});

        pnlSecInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnSecCancel, btnSecInsert, btnSecReset});

        pnlSecBody.add(pnlSecInfor, "card2");

        pnlSecTable.setBackground(new java.awt.Color(255, 255, 255));

        jScrollPane7.setBackground(new java.awt.Color(255, 255, 255));

        tblSec.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        tblSec.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tblSec.setUpdateSelectionOnSort(false);
        tblSec.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblSecMouseClicked(evt);
            }
        });
        jScrollPane7.setViewportView(tblSec);

        jPanel6.setBackground(new java.awt.Color(204, 0, 0));

        jLabel6.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setText("SELECT A SECTION TO EDIT");

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel6)
                .addGap(250, 250, 250))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel6)
                .addContainerGap())
        );

        btnSecTableOk.setBackground(new java.awt.Color(255, 255, 255));
        btnSecTableOk.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        btnSecTableOk.setText("Ok");
        btnSecTableOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSecTableOkActionPerformed(evt);
            }
        });

        btnSecTableCancel.setBackground(new java.awt.Color(255, 255, 255));
        btnSecTableCancel.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        btnSecTableCancel.setText("Cancel");
        btnSecTableCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSecTableCancelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlSecTableLayout = new javax.swing.GroupLayout(pnlSecTable);
        pnlSecTable.setLayout(pnlSecTableLayout);
        pnlSecTableLayout.setHorizontalGroup(
            pnlSecTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 934, Short.MAX_VALUE)
            .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlSecTableLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(btnSecTableOk)
                .addGap(18, 18, 18)
                .addComponent(btnSecTableCancel))
        );

        pnlSecTableLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnSecTableCancel, btnSecTableOk});

        pnlSecTableLayout.setVerticalGroup(
            pnlSecTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlSecTableLayout.createSequentialGroup()
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlSecTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnSecTableCancel)
                    .addComponent(btnSecTableOk, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(36, Short.MAX_VALUE))
        );

        pnlSecTableLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnSecTableCancel, btnSecTableOk});

        pnlSecBody.add(pnlSecTable, "card2");

        pnlAll_Body_Main_Bottom.add(pnlSecBody, "card2");

        pnlUserBody.setBackground(new java.awt.Color(255, 255, 255));
        pnlUserBody.setLayout(new java.awt.CardLayout());

        pnlUserInfor.setBackground(new java.awt.Color(255, 255, 255));

        jLabel91.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jLabel91.setText("USER ACCOUNT INFORMATION");

        jLabel100.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel100.setText("USERNAME:");

        jLabel120.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel120.setText("PASSWORD:");

        jLabel121.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel121.setText("EMPLOYEE ID:");

        jLabel122.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel122.setText("ACCESS-LEVEL");

        jLabel123.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel123.setText("CONFIRM PASSWORD:");

        txtUsername.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        txtUsername.setEnabled(false);

        pwfUserPass.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N

        pwfUserRePass.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N

        cbUserEmpId.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        cbUserEmpId.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        cbUserAccLevel.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        cbUserAccLevel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        lblUsernameCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblUsernameCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblUsernameCheck.setText("jLabel2");

        lblUserPasswordCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblUserPasswordCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblUserPasswordCheck.setText("jLabel3");

        lblUserEmpIdCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblUserEmpIdCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblUserEmpIdCheck.setText("jLabel4");

        lblUserAccLevelCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblUserAccLevelCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblUserAccLevelCheck.setText("jLabel5");

        lblUserRePasswordCheck.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblUserRePasswordCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblUserRePasswordCheck.setText("jLabel3");

        btnUserInsert.setBackground(new java.awt.Color(0, 153, 255));
        btnUserInsert.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnUserInsert.setForeground(new java.awt.Color(255, 255, 255));
        btnUserInsert.setText("INSERT");
        btnUserInsert.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUserInsertActionPerformed(evt);
            }
        });

        btnUserReset.setBackground(new java.awt.Color(0, 153, 255));
        btnUserReset.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnUserReset.setForeground(new java.awt.Color(255, 255, 255));
        btnUserReset.setText("RESET");
        btnUserReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUserResetActionPerformed(evt);
            }
        });

        btnUserCancel.setBackground(new java.awt.Color(0, 153, 255));
        btnUserCancel.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnUserCancel.setForeground(new java.awt.Color(255, 255, 255));
        btnUserCancel.setText("CANCEL");
        btnUserCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUserCancelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlUserInforLayout = new javax.swing.GroupLayout(pnlUserInfor);
        pnlUserInfor.setLayout(pnlUserInforLayout);
        pnlUserInforLayout.setHorizontalGroup(
            pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlUserInforLayout.createSequentialGroup()
                .addGap(281, 281, 281)
                .addComponent(btnUserInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnUserReset, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnUserCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(257, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlUserInforLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlUserInforLayout.createSequentialGroup()
                        .addGap(15, 15, 15)
                        .addComponent(jLabel91))
                    .addGroup(pnlUserInforLayout.createSequentialGroup()
                        .addGroup(pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel123, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel120, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel100, javax.swing.GroupLayout.Alignment.TRAILING))
                            .addGroup(pnlUserInforLayout.createSequentialGroup()
                                .addGap(53, 53, 53)
                                .addGroup(pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel121)
                                    .addGroup(pnlUserInforLayout.createSequentialGroup()
                                        .addGap(1, 1, 1)
                                        .addComponent(jLabel122)))))
                        .addGap(18, 18, 18)
                        .addGroup(pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblUserAccLevelCheck)
                            .addComponent(cbUserAccLevel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblUserEmpIdCheck)
                            .addComponent(cbUserEmpId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblUserRePasswordCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(pwfUserRePass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblUserPasswordCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(pwfUserPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblUsernameCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtUsername, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(158, 158, 158))
        );

        pnlUserInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cbUserAccLevel, cbUserEmpId, pwfUserPass, pwfUserRePass, txtUsername});

        pnlUserInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {lblUserAccLevelCheck, lblUserEmpIdCheck, lblUserPasswordCheck, lblUserRePasswordCheck, lblUsernameCheck});

        pnlUserInforLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnUserCancel, btnUserInsert, btnUserReset});

        pnlUserInforLayout.setVerticalGroup(
            pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlUserInforLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel91)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtUsername, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel100))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblUsernameCheck)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(pwfUserPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel120))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblUserPasswordCheck)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(pwfUserRePass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel123))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblUserRePasswordCheck)
                .addGroup(pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                        .addComponent(cbUserEmpId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel121))
                    .addGroup(pnlUserInforLayout.createSequentialGroup()
                        .addGap(41, 41, 41)
                        .addComponent(lblUserEmpIdCheck)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(cbUserAccLevel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel122))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblUserAccLevelCheck)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)
                .addGroup(pnlUserInforLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnUserInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnUserReset, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnUserCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlUserInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {cbUserAccLevel, cbUserEmpId, pwfUserPass, pwfUserRePass, txtUsername});

        pnlUserInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {lblUserAccLevelCheck, lblUserEmpIdCheck, lblUserPasswordCheck, lblUserRePasswordCheck, lblUsernameCheck});

        pnlUserInforLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnUserCancel, btnUserInsert, btnUserReset});

        pnlUserBody.add(pnlUserInfor, "card2");

        pnlUserTable.setBackground(new java.awt.Color(255, 255, 255));

        jScrollPane5.setBackground(new java.awt.Color(255, 255, 255));

        tblUser.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        tblUser.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tblUser.setUpdateSelectionOnSort(false);
        tblUser.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblUserMouseClicked(evt);
            }
        });
        jScrollPane5.setViewportView(tblUser);

        jPanel5.setBackground(new java.awt.Color(204, 0, 0));

        jLabel5.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setText("SELECT A USER ACCOUNT TO EDIT");

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(179, 179, 179)
                .addComponent(jLabel5)
                .addContainerGap(219, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel5)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btnUserTableOk.setBackground(new java.awt.Color(255, 255, 255));
        btnUserTableOk.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        btnUserTableOk.setText("Ok");
        btnUserTableOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUserTableOkActionPerformed(evt);
            }
        });

        btnUserTableCancel.setBackground(new java.awt.Color(255, 255, 255));
        btnUserTableCancel.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        btnUserTableCancel.setText("Cancel");
        btnUserTableCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUserTableCancelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlUserTableLayout = new javax.swing.GroupLayout(pnlUserTable);
        pnlUserTable.setLayout(pnlUserTableLayout);
        pnlUserTableLayout.setHorizontalGroup(
            pnlUserTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 934, Short.MAX_VALUE)
            .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlUserTableLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(btnUserTableOk)
                .addGap(18, 18, 18)
                .addComponent(btnUserTableCancel))
        );

        pnlUserTableLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnUserTableCancel, btnUserTableOk});

        pnlUserTableLayout.setVerticalGroup(
            pnlUserTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlUserTableLayout.createSequentialGroup()
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlUserTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnUserTableCancel)
                    .addComponent(btnUserTableOk, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(36, Short.MAX_VALUE))
        );

        pnlUserTableLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnUserTableCancel, btnUserTableOk});

        pnlUserBody.add(pnlUserTable, "card2");

        pnlAll_Body_Main_Bottom.add(pnlUserBody, "card2");

        javax.swing.GroupLayout pnlAll_Body_MainLayout = new javax.swing.GroupLayout(pnlAll_Body_Main);
        pnlAll_Body_Main.setLayout(pnlAll_Body_MainLayout);
        pnlAll_Body_MainLayout.setHorizontalGroup(
            pnlAll_Body_MainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlAll_Body_Main_Head, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
            .addComponent(pnlAll_Body_Main_Bottom, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        pnlAll_Body_MainLayout.setVerticalGroup(
            pnlAll_Body_MainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAll_Body_MainLayout.createSequentialGroup()
                .addComponent(pnlAll_Body_Main_Head, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlAll_Body_Main_Bottom, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlAll_Body.add(pnlAll_Body_Main, "card2");

        javax.swing.GroupLayout pnlAllLayout = new javax.swing.GroupLayout(pnlAll);
        pnlAll.setLayout(pnlAllLayout);
        pnlAllLayout.setHorizontalGroup(
            pnlAllLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAllLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlAllLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlAllLayout.createSequentialGroup()
                        .addComponent(pnlAll_Body, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(pnlAllLayout.createSequentialGroup()
                        .addComponent(pnlAll_Head, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(pnlAll_Wellcome, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
        );
        pnlAllLayout.setVerticalGroup(
            pnlAllLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAllLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlAllLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlAll_Head, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pnlAll_Wellcome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pnlAll_Body, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        getContentPane().add(pnlAll, "card3");

        pnlOrg.setBackground(new java.awt.Color(255, 255, 255));
        pnlOrg.setForeground(new java.awt.Color(255, 255, 255));

        pnlAll_Head1.setBackground(new java.awt.Color(255, 255, 255));
        pnlAll_Head1.setForeground(new java.awt.Color(255, 255, 255));

        btnVacFillMaster.setBackground(new java.awt.Color(255, 255, 255));
        btnVacFillMaster.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        btnVacFillMaster.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/add_list-48.png"))); // NOI18N
        btnVacFillMaster.setText("Vacancy Fill");
        btnVacFillMaster.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnVacFillMaster.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnVacFillMaster.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacFillMasterActionPerformed(evt);
            }
        });

        btnJobMaster.setBackground(new java.awt.Color(255, 255, 255));
        btnJobMaster.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        btnJobMaster.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/refresh-48.png"))); // NOI18N
        btnJobMaster.setText("Jop Rotation");
        btnJobMaster.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnJobMaster.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnJobMaster.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnJobMasterActionPerformed(evt);
            }
        });

        btnOrgMaster.setBackground(new java.awt.Color(255, 255, 255));
        btnOrgMaster.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        btnOrgMaster.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/organization-48.png"))); // NOI18N
        btnOrgMaster.setText("Organization");
        btnOrgMaster.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnOrgMaster.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnOrgMaster.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnOrgMasterActionPerformed(evt);
            }
        });

        btnHierachyMaster.setBackground(new java.awt.Color(255, 255, 255));
        btnHierachyMaster.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        btnHierachyMaster.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/New folder/Vacancy.png"))); // NOI18N
        btnHierachyMaster.setText("Hierachy");
        btnHierachyMaster.setToolTipText("");
        btnHierachyMaster.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnHierachyMaster.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnHierachyMaster.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnHierachyMasterActionPerformed(evt);
            }
        });

        btnMasterSec1.setBackground(new java.awt.Color(255, 255, 255));
        btnMasterSec1.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        btnMasterSec1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/New folder/Section.png"))); // NOI18N
        btnMasterSec1.setText("Section");
        btnMasterSec1.setToolTipText("");
        btnMasterSec1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnMasterSec1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnMasterSec1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMasterSec1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlAll_Head1Layout = new javax.swing.GroupLayout(pnlAll_Head1);
        pnlAll_Head1.setLayout(pnlAll_Head1Layout);
        pnlAll_Head1Layout.setHorizontalGroup(
            pnlAll_Head1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAll_Head1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnVacFillMaster)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnJobMaster)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnOrgMaster)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnHierachyMaster)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnMasterSec1, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlAll_Head1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnHierachyMaster, btnJobMaster, btnMasterSec1, btnOrgMaster, btnVacFillMaster});

        pnlAll_Head1Layout.setVerticalGroup(
            pnlAll_Head1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAll_Head1Layout.createSequentialGroup()
                .addGroup(pnlAll_Head1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(btnMasterSec1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnHierachyMaster, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnOrgMaster, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnJobMaster, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnVacFillMaster, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(0, 0, Short.MAX_VALUE))
        );

        pnlAll_Head1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnHierachyMaster, btnJobMaster, btnMasterSec1, btnOrgMaster, btnVacFillMaster});

        pnlAll_Wellcome1.setBackground(new java.awt.Color(255, 255, 255));
        pnlAll_Wellcome1.setForeground(new java.awt.Color(255, 255, 255));

        btnEditUser1.setBackground(new java.awt.Color(255, 255, 255));
        btnEditUser1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/logout-26.png"))); // NOI18N
        btnEditUser1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditUser1ActionPerformed(evt);
            }
        });

        lblWellcome1.setFont(new java.awt.Font("Segoe UI Light", 0, 12)); // NOI18N
        lblWellcome1.setText("Wellcome");

        lblUser1.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        lblUser1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblUser1.setText("LINH");
        lblUser1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        lblAcclevel1.setFont(new java.awt.Font("Segoe UI Light", 0, 12)); // NOI18N
        lblAcclevel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblAcclevel1.setText("Access-level: Administrator");

        javax.swing.GroupLayout pnlAll_Wellcome1Layout = new javax.swing.GroupLayout(pnlAll_Wellcome1);
        pnlAll_Wellcome1.setLayout(pnlAll_Wellcome1Layout);
        pnlAll_Wellcome1Layout.setHorizontalGroup(
            pnlAll_Wellcome1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAll_Wellcome1Layout.createSequentialGroup()
                .addGroup(pnlAll_Wellcome1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlAll_Wellcome1Layout.createSequentialGroup()
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(pnlAll_Wellcome1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlAll_Wellcome1Layout.createSequentialGroup()
                                .addComponent(lblWellcome1)
                                .addGap(26, 26, 26))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlAll_Wellcome1Layout.createSequentialGroup()
                                .addComponent(lblUser1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                        .addComponent(btnEditUser1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlAll_Wellcome1Layout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addComponent(lblAcclevel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pnlAll_Wellcome1Layout.setVerticalGroup(
            pnlAll_Wellcome1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAll_Wellcome1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlAll_Wellcome1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnEditUser1)
                    .addGroup(pnlAll_Wellcome1Layout.createSequentialGroup()
                        .addComponent(lblWellcome1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblUser1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblAcclevel1, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pnlOrg_Main.setBackground(new java.awt.Color(255, 255, 255));
        pnlOrg_Main.setForeground(new java.awt.Color(255, 255, 255));
        pnlOrg_Main.setLayout(new java.awt.CardLayout());

        pnlOrg_Hierachy.setBackground(new java.awt.Color(255, 255, 255));
        pnlOrg_Hierachy.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlOrg_Hierachy.setForeground(new java.awt.Color(255, 255, 255));

        jPanel7.setBackground(new java.awt.Color(0, 0, 204));

        jLabel26.setFont(new java.awt.Font("Segoe UI Light", 0, 36)); // NOI18N
        jLabel26.setForeground(new java.awt.Color(255, 255, 255));
        jLabel26.setText("ORGANIZATION DETAILS");

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel26)
                .addGap(238, 238, 238))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel26)
                .addContainerGap(19, Short.MAX_VALUE))
        );

        listOrgDep.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        listOrgDep.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        listOrgDep.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                listOrgDepMouseClicked(evt);
            }
        });
        scpOrgDepList.setViewportView(listOrgDep);

        tblOrg.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        scpOrgTable.setViewportView(tblOrg);

        jLabel31.setBackground(new java.awt.Color(0, 204, 204));
        jLabel31.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel31.setForeground(new java.awt.Color(255, 255, 255));
        jLabel31.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel31.setText("DEPARTMENTS LIST");
        jLabel31.setOpaque(true);

        jPanel8.setBackground(new java.awt.Color(0, 102, 255));

        jLabel32.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel32.setForeground(new java.awt.Color(255, 255, 255));
        jLabel32.setText("LIST OF:");

        rdbOrgEmp.setBackground(new java.awt.Color(0, 102, 255));
        grdOrgChooseTable.add(rdbOrgEmp);
        rdbOrgEmp.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        rdbOrgEmp.setForeground(new java.awt.Color(255, 255, 255));
        rdbOrgEmp.setSelected(true);
        rdbOrgEmp.setText("Employees");
        rdbOrgEmp.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                rdbOrgEmpItemStateChanged(evt);
            }
        });

        rdbOrgSec.setBackground(new java.awt.Color(0, 102, 255));
        grdOrgChooseTable.add(rdbOrgSec);
        rdbOrgSec.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        rdbOrgSec.setForeground(new java.awt.Color(255, 255, 255));
        rdbOrgSec.setText("Sections");
        rdbOrgSec.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                rdbOrgSecItemStateChanged(evt);
            }
        });

        rdbOrgVac.setBackground(new java.awt.Color(0, 102, 255));
        grdOrgChooseTable.add(rdbOrgVac);
        rdbOrgVac.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        rdbOrgVac.setForeground(new java.awt.Color(255, 255, 255));
        rdbOrgVac.setText("Vacancies");
        rdbOrgVac.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                rdbOrgVacItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(144, Short.MAX_VALUE)
                .addComponent(jLabel32)
                .addGap(18, 18, 18)
                .addComponent(rdbOrgEmp)
                .addGap(18, 18, 18)
                .addComponent(rdbOrgSec)
                .addGap(18, 18, 18)
                .addComponent(rdbOrgVac)
                .addGap(210, 210, 210))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(rdbOrgVac)
                    .addComponent(rdbOrgSec)
                    .addComponent(rdbOrgEmp)
                    .addComponent(jLabel32))
                .addContainerGap(19, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout pnlOrg_HierachyLayout = new javax.swing.GroupLayout(pnlOrg_Hierachy);
        pnlOrg_Hierachy.setLayout(pnlOrg_HierachyLayout);
        pnlOrg_HierachyLayout.setHorizontalGroup(
            pnlOrg_HierachyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlOrg_HierachyLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlOrg_HierachyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(scpOrgDepList, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addComponent(jLabel31, javax.swing.GroupLayout.DEFAULT_SIZE, 172, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlOrg_HierachyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(scpOrgTable))
                .addContainerGap())
        );
        pnlOrg_HierachyLayout.setVerticalGroup(
            pnlOrg_HierachyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlOrg_HierachyLayout.createSequentialGroup()
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlOrg_HierachyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel31, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlOrg_HierachyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(scpOrgTable, javax.swing.GroupLayout.DEFAULT_SIZE, 369, Short.MAX_VALUE)
                    .addComponent(scpOrgDepList))
                .addGap(72, 72, 72))
        );

        pnlOrg_HierachyLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jLabel31, jPanel8});

        pnlOrg_Main.add(pnlOrg_Hierachy, "card2");

        pnlOrg_VacFill.setBackground(new java.awt.Color(255, 255, 255));
        pnlOrg_VacFill.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlOrg_VacFill.setForeground(new java.awt.Color(255, 255, 255));

        pnlVacFill_Head.setBackground(new java.awt.Color(0, 153, 0));
        pnlVacFill_Head.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel7.setFont(new java.awt.Font("Segoe UI Semilight", 0, 18)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(255, 255, 255));
        jLabel7.setText("VACANCY ID: ");

        jLabel8.setFont(new java.awt.Font("Segoe UI Semilight", 0, 18)); // NOI18N
        jLabel8.setForeground(new java.awt.Color(255, 255, 255));
        jLabel8.setText("EMPLOYEE ID:");

        txtVacFillInputCode.setEditable(false);
        txtVacFillInputCode.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N
        txtVacFillInputCode.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        txtVacFillInputCode.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                txtVacFillInputCodeMouseReleased(evt);
            }
        });
        txtVacFillInputCode.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtVacFillInputCodeKeyReleased(evt);
            }
        });

        btnVacFillViewTableVac.setBackground(new java.awt.Color(255, 255, 255));
        btnVacFillViewTableVac.setText("...");
        btnVacFillViewTableVac.setToolTipText("View All Vacancies");
        btnVacFillViewTableVac.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacFillViewTableVacActionPerformed(evt);
            }
        });

        lblVacFillCheckInputCode.setBackground(new java.awt.Color(255, 255, 0));
        lblVacFillCheckInputCode.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        lblVacFillCheckInputCode.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblVacFillCheckInputCode.setText("INPUT CODE");
        lblVacFillCheckInputCode.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        lblVacFillCheckInputCode.setOpaque(true);

        btnVacFillStart.setBackground(new java.awt.Color(255, 255, 255));
        btnVacFillStart.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnVacFillStart.setText("START INPUT");
        btnVacFillStart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacFillStartActionPerformed(evt);
            }
        });

        lblVacFillEmpId.setBackground(new java.awt.Color(255, 255, 255));
        lblVacFillEmpId.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        lblVacFillEmpId.setForeground(new java.awt.Color(255, 255, 255));
        lblVacFillEmpId.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);

        javax.swing.GroupLayout pnlVacFill_HeadLayout = new javax.swing.GroupLayout(pnlVacFill_Head);
        pnlVacFill_Head.setLayout(pnlVacFill_HeadLayout);
        pnlVacFill_HeadLayout.setHorizontalGroup(
            pnlVacFill_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlVacFill_HeadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlVacFill_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlVacFill_HeadLayout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addGap(13, 13, 13))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlVacFill_HeadLayout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))
                .addGroup(pnlVacFill_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtVacFillInputCode, javax.swing.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE)
                    .addComponent(lblVacFillEmpId, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnVacFillViewTableVac)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 70, Short.MAX_VALUE)
                .addComponent(lblVacFillCheckInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(75, 75, 75)
                .addComponent(btnVacFillStart, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pnlVacFill_HeadLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {lblVacFillEmpId, txtVacFillInputCode});

        pnlVacFill_HeadLayout.setVerticalGroup(
            pnlVacFill_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlVacFill_HeadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlVacFill_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlVacFill_HeadLayout.createSequentialGroup()
                        .addGroup(pnlVacFill_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(btnVacFillViewTableVac, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtVacFillInputCode, javax.swing.GroupLayout.DEFAULT_SIZE, 34, Short.MAX_VALUE)
                            .addComponent(jLabel7))
                        .addGap(18, 18, 18)
                        .addGroup(pnlVacFill_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel8)
                            .addComponent(lblVacFillEmpId, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlVacFill_HeadLayout.createSequentialGroup()
                        .addGap(28, 28, 28)
                        .addGroup(pnlVacFill_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnVacFillStart)
                            .addComponent(lblVacFillCheckInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );

        pnlVacFill_HeadLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnVacFillViewTableVac, lblVacFillEmpId, txtVacFillInputCode});

        pnlVacFill_Bottom.setBackground(new java.awt.Color(255, 255, 255));
        pnlVacFill_Bottom.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel12.setFont(new java.awt.Font("Segoe UI Semilight", 1, 24)); // NOI18N
        jLabel12.setText("VACANCY FILL DETAILS INFORMATION");

        jLabel11.setFont(new java.awt.Font("Segoe UI Semilight", 0, 18)); // NOI18N
        jLabel11.setText("FILL DATE:");

        jLabel10.setFont(new java.awt.Font("Segoe UI Semilight", 0, 18)); // NOI18N
        jLabel10.setText("INTAKE DETAILS:");

        txtVacFillDate.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N

        txaVacFillIntake.setColumns(20);
        txaVacFillIntake.setFont(new java.awt.Font("Segoe UI Light", 0, 14)); // NOI18N
        txaVacFillIntake.setLineWrap(true);
        txaVacFillIntake.setRows(5);
        scpVacFillIntake.setViewportView(txaVacFillIntake);

        btnVacFillInsert.setBackground(new java.awt.Color(255, 255, 255));
        btnVacFillInsert.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnVacFillInsert.setText("INSERT");
        btnVacFillInsert.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacFillInsertActionPerformed(evt);
            }
        });

        btnVacFillReset.setBackground(new java.awt.Color(255, 255, 255));
        btnVacFillReset.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnVacFillReset.setText("RESET");
        btnVacFillReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacFillResetActionPerformed(evt);
            }
        });

        btnVacFillCancel.setBackground(new java.awt.Color(255, 255, 255));
        btnVacFillCancel.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnVacFillCancel.setText("CANCEL");
        btnVacFillCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVacFillCancelActionPerformed(evt);
            }
        });

        lblVacFillDateCheck.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        lblVacFillDateCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblVacFillDateCheck.setText("jLabel13");

        lblVacFillIntakeCheck.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        lblVacFillIntakeCheck.setForeground(new java.awt.Color(255, 0, 0));
        lblVacFillIntakeCheck.setText("jLabel13");

        jButton2.setBackground(new java.awt.Color(255, 255, 255));
        jButton2.setText("...");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlVacFill_BottomLayout = new javax.swing.GroupLayout(pnlVacFill_Bottom);
        pnlVacFill_Bottom.setLayout(pnlVacFill_BottomLayout);
        pnlVacFill_BottomLayout.setHorizontalGroup(
            pnlVacFill_BottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlVacFill_BottomLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(btnVacFillInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnVacFillReset, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnVacFillCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(184, 184, 184))
            .addGroup(pnlVacFill_BottomLayout.createSequentialGroup()
                .addGap(171, 171, 171)
                .addGroup(pnlVacFill_BottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlVacFill_BottomLayout.createSequentialGroup()
                        .addGroup(pnlVacFill_BottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addGap(43, 43, 43)
                        .addGroup(pnlVacFill_BottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblVacFillIntakeCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 325, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(scpVacFillIntake, javax.swing.GroupLayout.DEFAULT_SIZE, 287, Short.MAX_VALUE)
                            .addComponent(lblVacFillDateCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 325, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(pnlVacFill_BottomLayout.createSequentialGroup()
                                .addComponent(txtVacFillDate)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(pnlVacFill_BottomLayout.createSequentialGroup()
                        .addGap(48, 48, 48)
                        .addComponent(jLabel12)))
                .addContainerGap(177, Short.MAX_VALUE))
        );

        pnlVacFill_BottomLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {scpVacFillIntake, txtVacFillDate});

        pnlVacFill_BottomLayout.setVerticalGroup(
            pnlVacFill_BottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlVacFill_BottomLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel12)
                .addGap(43, 43, 43)
                .addGroup(pnlVacFill_BottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtVacFillDate, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11)
                    .addComponent(jButton2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblVacFillDateCheck)
                .addGap(17, 17, 17)
                .addGroup(pnlVacFill_BottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel10)
                    .addComponent(scpVacFillIntake, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblVacFillIntakeCheck)
                .addGap(20, 20, 20)
                .addGroup(pnlVacFill_BottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnVacFillInsert)
                    .addComponent(btnVacFillReset)
                    .addComponent(btnVacFillCancel))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlVacFill_BottomLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jButton2, txtVacFillDate});

        javax.swing.GroupLayout pnlOrg_VacFillLayout = new javax.swing.GroupLayout(pnlOrg_VacFill);
        pnlOrg_VacFill.setLayout(pnlOrg_VacFillLayout);
        pnlOrg_VacFillLayout.setHorizontalGroup(
            pnlOrg_VacFillLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlOrg_VacFillLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlOrg_VacFillLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(pnlVacFill_Bottom, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlVacFill_Head, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnlOrg_VacFillLayout.setVerticalGroup(
            pnlOrg_VacFillLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlOrg_VacFillLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlVacFill_Head, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlVacFill_Bottom, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pnlOrg_Main.add(pnlOrg_VacFill, "card2");

        pnlOrg_JobRotation.setBackground(new java.awt.Color(255, 255, 255));
        pnlOrg_JobRotation.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlOrg_JobRotation.setForeground(new java.awt.Color(255, 255, 255));

        pnlJobRotation_Head.setBackground(new java.awt.Color(0, 153, 0));
        pnlJobRotation_Head.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        rdbConfirmVacFillDetails.setBackground(new java.awt.Color(0, 153, 0));
        grdOrgVacFillConfirm.add(rdbConfirmVacFillDetails);
        rdbConfirmVacFillDetails.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        rdbConfirmVacFillDetails.setForeground(new java.awt.Color(255, 255, 255));
        rdbConfirmVacFillDetails.setSelected(true);
        rdbConfirmVacFillDetails.setText("Confirm vacancy fill details");
        rdbConfirmVacFillDetails.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                rdbConfirmVacFillDetailsItemStateChanged(evt);
            }
        });

        rdbEmergencyJobRotation.setBackground(new java.awt.Color(0, 153, 0));
        grdOrgVacFillConfirm.add(rdbEmergencyJobRotation);
        rdbEmergencyJobRotation.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        rdbEmergencyJobRotation.setForeground(new java.awt.Color(255, 255, 255));
        rdbEmergencyJobRotation.setText("Emergency Job Rotation");

        jLabel9.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        jLabel9.setForeground(new java.awt.Color(255, 255, 255));
        jLabel9.setText("EMPLOYEE ID :");

        txtJobInputCode.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        txtJobInputCode.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        txtJobInputCode.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtJobInputCodeKeyReleased(evt);
            }
        });

        btnJobView.setBackground(new java.awt.Color(255, 255, 255));
        btnJobView.setText("...");
        btnJobView.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnJobViewActionPerformed(evt);
            }
        });

        lblCheckJobInputCode.setBackground(new java.awt.Color(0, 153, 0));
        lblCheckJobInputCode.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        lblCheckJobInputCode.setForeground(new java.awt.Color(255, 255, 255));
        lblCheckJobInputCode.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblCheckJobInputCode.setText("INPUT CODE");
        lblCheckJobInputCode.setOpaque(true);

        btnJobStart.setBackground(new java.awt.Color(255, 255, 255));
        btnJobStart.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        btnJobStart.setText("START INPUT");
        btnJobStart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnJobStartActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlJobRotation_HeadLayout = new javax.swing.GroupLayout(pnlJobRotation_Head);
        pnlJobRotation_Head.setLayout(pnlJobRotation_HeadLayout);
        pnlJobRotation_HeadLayout.setHorizontalGroup(
            pnlJobRotation_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlJobRotation_HeadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlJobRotation_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(pnlJobRotation_HeadLayout.createSequentialGroup()
                        .addComponent(rdbConfirmVacFillDetails)
                        .addGap(18, 18, 18)
                        .addComponent(rdbEmergencyJobRotation))
                    .addGroup(pnlJobRotation_HeadLayout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtJobInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnJobView, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 61, Short.MAX_VALUE)
                .addComponent(lblCheckJobInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(49, 49, 49)
                .addComponent(btnJobStart, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlJobRotation_HeadLayout.setVerticalGroup(
            pnlJobRotation_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlJobRotation_HeadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlJobRotation_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rdbConfirmVacFillDetails)
                    .addComponent(rdbEmergencyJobRotation))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlJobRotation_HeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(btnJobStart)
                    .addComponent(lblCheckJobInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnJobView)
                    .addComponent(txtJobInputCode, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9))
                .addContainerGap(21, Short.MAX_VALUE))
        );

        pnlJobRotation_HeadLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnJobView, txtJobInputCode});

        pnlJobRotation_Bottom.setBackground(new java.awt.Color(255, 255, 255));
        pnlJobRotation_Bottom.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlJobRotation_Bottom.setLayout(new java.awt.CardLayout());

        pnlConfirmVac.setBackground(new java.awt.Color(255, 255, 255));

        jLabel20.setFont(new java.awt.Font("Segoe UI Semilight", 1, 24)); // NOI18N
        jLabel20.setText("CONFIRMMING VACANCY FILL DETAILS");

        jLabel21.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel21.setText("PRESENT DESIGNATION :");

        jLabel22.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel22.setText("DEPUTE TO DEPARTMENT :");

        jLabel23.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel23.setText("STATUS :");

        jLabel25.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel25.setText("REMARKS :");

        txtJobConfirmVacDes.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N

        txtJobConfirmVacDep.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N

        btnJobConfirmVacOldShowMore.setBackground(new java.awt.Color(255, 255, 255));
        btnJobConfirmVacOldShowMore.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        btnJobConfirmVacOldShowMore.setText("Show more...");

        btnJobConfirmVacNewShowMore.setBackground(new java.awt.Color(255, 255, 255));
        btnJobConfirmVacNewShowMore.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        btnJobConfirmVacNewShowMore.setText("Show more...");

        txaJobConfirmVacRemark.setColumns(20);
        txaJobConfirmVacRemark.setRows(5);
        txaJobConfirmVacRemark.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txaJobConfirmVacRemarkFocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                txaJobConfirmVacRemarkFocusLost(evt);
            }
        });
        scpJobConfirmVacRemark.setViewportView(txaJobConfirmVacRemark);

        rdbJobConfirmVacConfim.setBackground(new java.awt.Color(255, 255, 255));
        grdJobConfirm.add(rdbJobConfirmVacConfim);
        rdbJobConfirmVacConfim.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N
        rdbJobConfirmVacConfim.setForeground(new java.awt.Color(0, 0, 255));
        rdbJobConfirmVacConfim.setText("Accept");

        rdbJobConfirmVacDeny.setBackground(new java.awt.Color(255, 255, 255));
        grdJobConfirm.add(rdbJobConfirmVacDeny);
        rdbJobConfirmVacDeny.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N
        rdbJobConfirmVacDeny.setForeground(new java.awt.Color(255, 0, 0));
        rdbJobConfirmVacDeny.setText("Deny");

        lblCheckJobConfirmVac.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        lblCheckJobConfirmVac.setForeground(new java.awt.Color(255, 0, 0));
        lblCheckJobConfirmVac.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblCheckJobConfirmVac.setText("Choose 1 status");

        btnConfirmVacOk.setBackground(new java.awt.Color(255, 255, 255));
        btnConfirmVacOk.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N
        btnConfirmVacOk.setText("OK");
        btnConfirmVacOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnConfirmVacOkActionPerformed(evt);
            }
        });

        btnConfirmVacCancel.setBackground(new java.awt.Color(255, 255, 255));
        btnConfirmVacCancel.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N
        btnConfirmVacCancel.setText("CANCEL");
        btnConfirmVacCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnConfirmVacCancelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlConfirmVacLayout = new javax.swing.GroupLayout(pnlConfirmVac);
        pnlConfirmVac.setLayout(pnlConfirmVacLayout);
        pnlConfirmVacLayout.setHorizontalGroup(
            pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlConfirmVacLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel20)
                .addGap(199, 199, 199))
            .addGroup(pnlConfirmVacLayout.createSequentialGroup()
                .addGap(301, 301, 301)
                .addComponent(btnConfirmVacOk, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 118, Short.MAX_VALUE)
                .addComponent(btnConfirmVacCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(273, 273, 273))
            .addGroup(pnlConfirmVacLayout.createSequentialGroup()
                .addGap(181, 181, 181)
                .addGroup(pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlConfirmVacLayout.createSequentialGroup()
                        .addGroup(pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel25, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel22, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel21, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel23, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addGap(18, 18, 18)
                        .addGroup(pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtJobConfirmVacDep, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtJobConfirmVacDes, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnJobConfirmVacOldShowMore)
                            .addComponent(btnJobConfirmVacNewShowMore)))
                    .addGroup(pnlConfirmVacLayout.createSequentialGroup()
                        .addGap(186, 186, 186)
                        .addGroup(pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(scpJobConfirmVacRemark)
                            .addGroup(pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(lblCheckJobConfirmVac, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlConfirmVacLayout.createSequentialGroup()
                                    .addComponent(rdbJobConfirmVacConfim)
                                    .addGap(18, 18, 18)
                                    .addComponent(rdbJobConfirmVacDeny))))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlConfirmVacLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {scpJobConfirmVacRemark, txtJobConfirmVacDep, txtJobConfirmVacDes});

        pnlConfirmVacLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnJobConfirmVacNewShowMore, btnJobConfirmVacOldShowMore});

        pnlConfirmVacLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {rdbJobConfirmVacConfim, rdbJobConfirmVacDeny});

        pnlConfirmVacLayout.setVerticalGroup(
            pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlConfirmVacLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel20)
                .addGap(44, 44, 44)
                .addGroup(pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(btnJobConfirmVacOldShowMore)
                    .addComponent(txtJobConfirmVacDes, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel21))
                .addGap(18, 18, 18)
                .addGroup(pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(btnJobConfirmVacNewShowMore)
                    .addComponent(txtJobConfirmVacDep, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel22))
                .addGap(18, 18, 18)
                .addGroup(pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(scpJobConfirmVacRemark, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel25))
                .addGap(18, 18, 18)
                .addGroup(pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel23)
                    .addComponent(rdbJobConfirmVacConfim)
                    .addComponent(rdbJobConfirmVacDeny))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblCheckJobConfirmVac)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)
                .addGroup(pnlConfirmVacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnConfirmVacOk, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnConfirmVacCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlConfirmVacLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnJobConfirmVacNewShowMore, btnJobConfirmVacOldShowMore, txtJobConfirmVacDes});

        pnlJobRotation_Bottom.add(pnlConfirmVac, "card6");

        pnlEmergency.setBackground(new java.awt.Color(255, 255, 255));

        jLabel24.setFont(new java.awt.Font("Segoe UI Semilight", 1, 24)); // NOI18N
        jLabel24.setText("EMERGENCY JOB ROTATION DETAILS");

        jLabel27.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel27.setText("PRESENT DESIGNATION :");

        jLabel28.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel28.setText("DEPUTE TO DEPARTMENT :");

        jLabel30.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel30.setText("REMARKS :");

        txtEmerDes.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N

        cbEmerDep.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N
        cbEmerDep.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbEmerDep.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbEmerDepItemStateChanged(evt);
            }
        });

        cbEmerSec.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N
        cbEmerSec.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Please select..." }));

        txaEmergencyRemark.setColumns(20);
        txaEmergencyRemark.setRows(5);
        scpEmergencyRemark.setViewportView(txaEmergencyRemark);

        jLabel33.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel33.setText("NEW SECTION :");

        lblCheckEmerDep.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblCheckEmerDep.setForeground(new java.awt.Color(255, 0, 0));
        lblCheckEmerDep.setText("jLabel34");

        lblCheckEmerSec.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N
        lblCheckEmerSec.setForeground(new java.awt.Color(255, 0, 0));
        lblCheckEmerSec.setText("jLabel34");

        btnEmerOk.setBackground(new java.awt.Color(255, 255, 255));
        btnEmerOk.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N
        btnEmerOk.setText("OK");
        btnEmerOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmerOkActionPerformed(evt);
            }
        });

        btnEmerCancel.setBackground(new java.awt.Color(255, 255, 255));
        btnEmerCancel.setFont(new java.awt.Font("Segoe UI Light", 1, 14)); // NOI18N
        btnEmerCancel.setText("CANCEL");
        btnEmerCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmerCancelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlEmergencyLayout = new javax.swing.GroupLayout(pnlEmergency);
        pnlEmergency.setLayout(pnlEmergencyLayout);
        pnlEmergencyLayout.setHorizontalGroup(
            pnlEmergencyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlEmergencyLayout.createSequentialGroup()
                .addGroup(pnlEmergencyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlEmergencyLayout.createSequentialGroup()
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel27)
                        .addGap(18, 18, 18)
                        .addComponent(txtEmerDes, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE))
                    .addGroup(pnlEmergencyLayout.createSequentialGroup()
                        .addGap(301, 301, 301)
                        .addComponent(btnEmerOk, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 118, Short.MAX_VALUE)
                        .addComponent(btnEmerCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlEmergencyLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addGroup(pnlEmergencyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(pnlEmergencyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(scpEmergencyRemark, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlEmergencyLayout.createSequentialGroup()
                                    .addComponent(jLabel30)
                                    .addGap(223, 223, 223)))
                            .addGroup(pnlEmergencyLayout.createSequentialGroup()
                                .addComponent(jLabel33)
                                .addGap(18, 18, 18)
                                .addGroup(pnlEmergencyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(lblCheckEmerSec, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(cbEmerSec, javax.swing.GroupLayout.Alignment.TRAILING, 0, 205, Short.MAX_VALUE)))
                            .addGroup(pnlEmergencyLayout.createSequentialGroup()
                                .addComponent(jLabel28)
                                .addGap(18, 18, 18)
                                .addGroup(pnlEmergencyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblCheckEmerDep, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(cbEmerDep, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))))
                .addGap(273, 273, 273))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlEmergencyLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel24)
                .addGap(221, 221, 221))
        );

        pnlEmergencyLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cbEmerDep, cbEmerSec, lblCheckEmerDep, lblCheckEmerSec, txtEmerDes});

        pnlEmergencyLayout.setVerticalGroup(
            pnlEmergencyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEmergencyLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel24)
                .addGap(32, 32, 32)
                .addGroup(pnlEmergencyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtEmerDes, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel27))
                .addGap(27, 27, 27)
                .addGroup(pnlEmergencyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel28)
                    .addComponent(cbEmerDep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(lblCheckEmerDep)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEmergencyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel33)
                    .addComponent(cbEmerSec, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblCheckEmerSec)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEmergencyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(scpEmergencyRemark, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel30))
                .addGap(45, 45, 45)
                .addGroup(pnlEmergencyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnEmerOk, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnEmerCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlEmergencyLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {cbEmerDep, cbEmerSec, txtEmerDes});

        pnlJobRotation_Bottom.add(pnlEmergency, "card6");

        javax.swing.GroupLayout pnlOrg_JobRotationLayout = new javax.swing.GroupLayout(pnlOrg_JobRotation);
        pnlOrg_JobRotation.setLayout(pnlOrg_JobRotationLayout);
        pnlOrg_JobRotationLayout.setHorizontalGroup(
            pnlOrg_JobRotationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlOrg_JobRotationLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlJobRotation_Head, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(pnlOrg_JobRotationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(pnlOrg_JobRotationLayout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(pnlJobRotation_Bottom, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        pnlOrg_JobRotationLayout.setVerticalGroup(
            pnlOrg_JobRotationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlOrg_JobRotationLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlJobRotation_Head, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(470, Short.MAX_VALUE))
            .addGroup(pnlOrg_JobRotationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlOrg_JobRotationLayout.createSequentialGroup()
                    .addContainerGap(155, Short.MAX_VALUE)
                    .addComponent(pnlJobRotation_Bottom, javax.swing.GroupLayout.PREFERRED_SIZE, 419, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()))
        );

        pnlOrg_Main.add(pnlOrg_JobRotation, "card2");

        javax.swing.GroupLayout pnlOrgLayout = new javax.swing.GroupLayout(pnlOrg);
        pnlOrg.setLayout(pnlOrgLayout);
        pnlOrgLayout.setHorizontalGroup(
            pnlOrgLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlOrgLayout.createSequentialGroup()
                .addComponent(pnlAll_Head1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(27, 27, 27)
                .addComponent(pnlAll_Wellcome1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(104, 104, 104))
            .addGroup(pnlOrgLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlOrg_Main, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlOrgLayout.setVerticalGroup(
            pnlOrgLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlOrgLayout.createSequentialGroup()
                .addGap(2, 2, 2)
                .addGroup(pnlOrgLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlAll_Wellcome1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pnlAll_Head1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(pnlOrg_Main, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        getContentPane().add(pnlOrg, "card3");

        mnuBar.setBackground(new java.awt.Color(255, 255, 255));
        mnuBar.setForeground(new java.awt.Color(255, 255, 255));
        mnuBar.setBorderPainted(false);
        mnuBar.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N

        mnuMaster.setText("Master");
        mnuMaster.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                mnuMasterMouseClicked(evt);
            }
        });

        mniDep.setText("Master Department");
        mniDep.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniDepActionPerformed(evt);
            }
        });
        mnuMaster.add(mniDep);

        mniEmp.setText("Master Employee");
        mniEmp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniEmpActionPerformed(evt);
            }
        });
        mnuMaster.add(mniEmp);

        mniDes.setText("Master Designation");
        mniDes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniDesActionPerformed(evt);
            }
        });
        mnuMaster.add(mniDes);

        mniVac.setText("Master Vacancy");
        mniVac.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniVacActionPerformed(evt);
            }
        });
        mnuMaster.add(mniVac);

        mniSec.setText("Master Section");
        mniSec.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniSecActionPerformed(evt);
            }
        });
        mnuMaster.add(mniSec);

        mniUser.setText("Master User");
        mniUser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniUserActionPerformed(evt);
            }
        });
        mnuMaster.add(mniUser);
        mnuMaster.add(jSeparator1);

        mniExit.setText("Exit");
        mniExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniExitActionPerformed(evt);
            }
        });
        mnuMaster.add(mniExit);

        mnuBar.add(mnuMaster);

        mnuOrganization.setText("Organization");
        mnuOrganization.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                mnuOrganizationMouseClicked(evt);
            }
        });

        mniVacFill.setText("Vacancy Fill Information");
        mniVacFill.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniVacFillActionPerformed(evt);
            }
        });
        mnuOrganization.add(mniVacFill);

        mniJobRole.setText("Job Role Rotation");
        mniJobRole.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniJobRoleActionPerformed(evt);
            }
        });
        mnuOrganization.add(mniJobRole);

        mniOrg.setText("Organization");
        mniOrg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniOrgActionPerformed(evt);
            }
        });
        mnuOrganization.add(mniOrg);

        mniEmpHierachy.setText("Employee Hierachy");
        mniEmpHierachy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniEmpHierachyActionPerformed(evt);
            }
        });
        mnuOrganization.add(mniEmpHierachy);

        mnuBar.add(mnuOrganization);

        mnuHelp.setText("Help");

        mniAbout.setText("About us");
        mniAbout.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniAboutActionPerformed(evt);
            }
        });
        mnuHelp.add(mniAbout);

        mnuBar.add(mnuHelp);

        setJMenuBar(mnuBar);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoginActionPerformed
        login();
    }//GEN-LAST:event_btnLoginActionPerformed

    private void tblDesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblDesMouseClicked
        int rowChoose = tblDes.getSelectedRow();
        String codeChooce = tblDes.getValueAt(rowChoose, 0).toString();
        if (rowChoose == -1) {
            btnDesTableOk.setEnabled(false);
            return;
        }
        btnDesTableOk.setEnabled(true);
        if (evt.getClickCount() == 2) {
            if (rowChoose == -1) {
                return;
            }
            txtDesInputCode.setText(codeChooce);
            showChoice(pnlDesHead, pnlDesBody, pnlDesInfor);
            disablePanelInfo(pnlDesInfor, pnlDesHead);
            checkDesInputCode(txtDesInputCode.getText().trim(), lblDesInsertCode, btnDesStart, lblDesCheckInputCode);
            btnDesStart.requestFocus();
        }
    }//GEN-LAST:event_tblDesMouseClicked

    private void btnDesCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDesCancelActionPerformed
        int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to cancel this?", "DESIGNATION MASTER", JOptionPane.YES_NO_OPTION);
        if (choice == JOptionPane.NO_OPTION) {
            return;
        }

        txtDesInputCode.requestFocus();
        hideLabelCheck();
        disablePanelInfo(pnlDesInfor, pnlDesHead);
        if (btnDesInsert.getText().equals("INSERT")) {
            resetAllTextField();
            return;
        }
        loadDesToUpdate(txtDesInputCode.getText().trim());
    }//GEN-LAST:event_btnDesCancelActionPerformed

    private void btnDesResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDesResetActionPerformed
        if (btnDesReset.getText().equals("DELETE")) {
            int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to delete this Designation?", "DESIGNATION MASTER", JOptionPane.YES_NO_OPTION);
            if (choice == JOptionPane.NO_OPTION) {
                return;
            }

            String DesId = txtDesInputCode.getText().trim();

            if (!desDAO.deleteDes(DesId)) {
                JOptionPane.showMessageDialog(this, "Cannot delete\n This Designation have Employees, Vacancies v.v.. you must delete that record first", "DESIGNATION MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Delete Designation successfully!", "DESIGNATION MASTER", JOptionPane.INFORMATION_MESSAGE);

            // Back to Master choice of Department
            showChoice(pnlDesHead, pnlDesBody, pnlDesInfor);
            disablePanelInfo(pnlDesInfor, pnlDesHead);
            checkDesInputCode(txtDesInputCode.getText().trim(), lblDesInsertCode, btnDesStart, lblDesCheckInputCode);

            txtDesInputCode.requestFocus();
            return;
        }

        if (btnDesReset.getText().equals("RESET")) {
            resetAllTextField();
            txtDesName.requestFocus();
        }
    }//GEN-LAST:event_btnDesResetActionPerformed

    private void btnDesInsertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDesInsertActionPerformed
        String desId = txtDesInputCode.getText().trim();
        String desName = txtDesName.getText().trim();

        Vector v = new Vector();
        v.add(desId);
        v.add(desName);

        if (btnDesInsert.getText().equals("INSERT")) {
            if (!validateDesInsert()) {
                return;
            }

            if (!desDAO.insertDes(v)) {
                JOptionPane.showMessageDialog(this, "Cannot Insert! Please try again!", "DESIGNATION MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Insert new DESIGNATION successfully!", "DESIGNATION MASTER", JOptionPane.INFORMATION_MESSAGE);

            disablePanelInfo(pnlDesInfor, pnlDesHead);
            checkDesInputCode(txtDesInputCode.getText().trim(), lblDesInsertCode, btnDesStart, lblDesCheckInputCode);
            txtDesInputCode.requestFocus();
            return;
        }

        if (btnDesInsert.getText().equals("UPDATE")) {
            if (!validateDesInsert()) {
                return;
            }

            if (!desDAO.updateDes(v)) {
                JOptionPane.showMessageDialog(this, "Cannot edit! Please try again!", "DESIGNATION MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Update DESIGNATION successfully!", "DESIGNATION MASTER", JOptionPane.INFORMATION_MESSAGE);

            disablePanelInfo(pnlDesInfor, pnlDesHead);
            checkDesInputCode(txtDesInputCode.getText().trim(), lblDesInsertCode, btnDesStart, lblDesCheckInputCode);
            txtDesInputCode.requestFocus();
            return;
        }
    }//GEN-LAST:event_btnDesInsertActionPerformed

    private void tblEmpMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblEmpMouseClicked
        int rowChoose = tblEmp.getSelectedRow();
        if (rowChoose == -1) {
            btnEmpTableOk.setEnabled(false);
            return;
        }
        btnEmpTableOk.setEnabled(true);
        String codeChooce = tblEmp.getValueAt(rowChoose, 0).toString();

        if (evt.getClickCount() == 2) {
            if (rowChoose == -1) {
                return;
            }
            txtEmpInputCode.setText(codeChooce);
            showChoice(pnlEmpHead, pnlEmpBody, pnlEmpInfor);
            disablePanelInfo(pnlEmpInfor, pnlEmpHead);
            checkEmpInputCode(txtEmpInputCode.getText().trim(), lblEmpInsertCode, btnEmpStart, lblEmpCheckInputCode);
            txtEmpInputCode.requestFocus();
        }
    }//GEN-LAST:event_tblEmpMouseClicked

    private void btnEmpCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEmpCancelActionPerformed
        int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to cancel this?", "EMPLOYEE MASTER", JOptionPane.YES_NO_OPTION);
        if (choice == JOptionPane.NO_OPTION) {
            return;
        }
        hideLabelCheck();
        txtEmpInputCode.requestFocus();
        disablePanelInfo(pnlEmpInfor, pnlEmpHead);
        if (btnEmpInsert.getText().equals("INSERT")) {
            resetAllTextField();
            return;
        }
        loadEmpToUpdate(txtEmpInputCode.getText().trim());
    }//GEN-LAST:event_btnEmpCancelActionPerformed

    private void btnEmpResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEmpResetActionPerformed
        if (btnEmpReset.getText().equals("DELETE")) {
            int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to delete this employee?", "EMPLOYEE MASTER", JOptionPane.YES_NO_OPTION);
            if (choice == JOptionPane.NO_OPTION) {
                return;
            }

            String EmpId = txtEmpInputCode.getText().trim();

            if (!empDAO.deleteEmp(EmpId)) {
                JOptionPane.showMessageDialog(this, "Cannot delete\n This Employee have Vacancy Fill Details have not confirm v.v.. you must delete that record first", "EMPLOYEE MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Delete Employee successfully!", "EMPLOYEE MASTER", JOptionPane.INFORMATION_MESSAGE);

            // Back to Master choice of Department
            showChoice(pnlEmpHead, pnlEmpBody, pnlEmpInfor);
            disablePanelInfo(pnlEmpInfor, pnlEmpHead);
            checkEmpInputCode(txtEmpInputCode.getText().trim(), lblEmpInsertCode, btnEmpStart, lblEmpCheckInputCode);
            txtEmpInputCode.requestFocus();
            return;
        }

        if (btnEmpReset.getText().equals("RESET")) {
            resetAllTextField();
            txtEmpName.requestFocus();
        }
    }//GEN-LAST:event_btnEmpResetActionPerformed

    private void btnEmpInsertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEmpInsertActionPerformed
        String empId = txtEmpId.getText().trim();
        String empName = txtEmpName.getText().trim();
        String empAddress = txtEmpAddress.getText().trim();
        String empPhone = txtEmpPhone.getText().trim();
        String empFax = txtEmpFax.getText().trim();
        String empEmail = txtEmpEmail.getText().trim();
        String empDepNo = cbEmpDepNo.getSelectedItem().toString();
        String empDesId = cbEmpDesId.getSelectedItem().toString();
        String empSecId = cbEmpSecId.getSelectedItem().toString();

        Vector v = new Vector();
        v.add(empId);
        v.add(empName);
        v.add(empDepNo);
        v.add(empDesId);
        v.add(empSecId);
        v.add(empAddress);
        v.add(empPhone);
        v.add(empFax);
        v.add(empEmail);

        if (btnEmpInsert.getText().equals("INSERT")) {
            if (!validateEmpInsert()) {
                return;
            }

            if (!empDAO.insertEmp(v)) {
                JOptionPane.showMessageDialog(this, "Cannot Insert! Please try again!", "EMPLOYEE MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Insert new employee successfully!", "EMPLOYEE MASTER", JOptionPane.INFORMATION_MESSAGE);

            disablePanelInfo(pnlEmpInfor, pnlEmpHead);
            checkEmpInputCode(txtEmpInputCode.getText().trim(), lblEmpInsertCode, btnEmpStart, lblEmpCheckInputCode);
            txtEmpInputCode.requestFocus();
            return;
        }

        if (btnEmpInsert.getText().equals("UPDATE")) {
            if (!validateEmpInsert()) {
                return;
            }

            int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to update this Employee?", "EMPLOYEE MASTER", JOptionPane.YES_NO_OPTION);
            if (choice == JOptionPane.NO_OPTION) {
                return;
            }

            if (!empDAO.updateEmp(v)) {
                JOptionPane.showMessageDialog(this, "Cannot edit! Please try again!", "EMPLOYEE MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Update EMPLOYEE successfully!", "EMPLOYEE MASTER", JOptionPane.INFORMATION_MESSAGE);

            disablePanelInfo(pnlEmpInfor, pnlEmpHead);
            checkEmpInputCode(txtEmpInputCode.getText().trim(), lblEmpInsertCode, btnEmpStart, lblEmpCheckInputCode);
            txtEmpInputCode.requestFocus();
            return;
        }
    }//GEN-LAST:event_btnEmpInsertActionPerformed

    private void tblDepMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblDepMouseClicked
        int rowChoose = tblDep.getSelectedRow();
        String codeChooce = tblDep.getValueAt(rowChoose, 0).toString();
        if (rowChoose == -1) {
            btnDepTableOk.setEnabled(false);
            return;
        }
        btnDepTableOk.setEnabled(true);
        if (evt.getClickCount() == 2) {
            if (rowChoose == -1) {
                return;
            }

            txtDepInputCode.setText(codeChooce);
            showChoice(pnlDepHead, pnlDepBody, pnlDepInfor);
            disablePanelInfo(pnlDepInfor, pnlDepHead);
            checkDepInputCode(txtDepInputCode.getText().trim(), lblDepInsertCode, btnDepStart, lblDepCheckInputCode);
            txtDepInputCode.requestFocus();
        }

    }//GEN-LAST:event_tblDepMouseClicked

    private void btnDepCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDepCancelActionPerformed
        int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to cancel this?", "DEPARTMENT MASTER", JOptionPane.YES_NO_OPTION);
        if (choice == JOptionPane.NO_OPTION) {
            return;
        }

        disablePanelInfo(pnlDepInfor, pnlDepHead);
        hideLabelCheck();
        txtDepInputCode.requestFocus();
        if (btnDepInsert.getText().equals("INSERT")) {
            resetAllTextField();
            return;
        }

        loadDepToUpdate(Integer.parseInt(txtDepInputCode.getText().trim()));
    }//GEN-LAST:event_btnDepCancelActionPerformed

    private void btnDepResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDepResetActionPerformed
        if (btnDepReset.getText().equals("DELETE")) {
            int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to delete this deparment?", "DEPARTMENT MASTER", JOptionPane.YES_NO_OPTION);
            if (choice == JOptionPane.NO_OPTION) {
                return;
            }

            int DepNo = Integer.parseInt(txtDepInputCode.getText().trim());

            if (!depDAO.deleteDep(DepNo)) {
                JOptionPane.showMessageDialog(this, "Cannot delete\n This department have Emloyees, Vacancies v.v.. you must delete that record first", "DEPARTMENT MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Delete DEPARTMENT successfully!", "DEPARTMENT MASTER", JOptionPane.INFORMATION_MESSAGE);

            // Back to Master choice of Department
            showChoice(pnlDepHead, pnlDepBody, pnlDepInfor);
            checkDepInputCode(txtDepInputCode.getText().trim(), lblDepInsertCode, btnDepStart, lblDepCheckInputCode);
            disablePanelInfo(pnlDepInfor, pnlDepHead);
            txtDepInputCode.requestFocus();
            return;
        }

        if (btnDepReset.getText().equals("RESET")) {
            resetAllTextField();
            hideLabelCheck();
            txtDepName.requestFocus();
            return;
        }
    }//GEN-LAST:event_btnDepResetActionPerformed

    private void btnDepInsertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDepInsertActionPerformed
        if (btnDepInsert.getText().equals("INSERT")) {
            if (!validateDepInsert()) {
                return;
            }

            int DepNo = Integer.parseInt(txtDepNo.getText().trim());
            String DepName = txtDepName.getText().trim();
            String DepHead = txtDepHead.getText().trim();
            String DepLocal = txtDepLocation.getText().trim();

            if (!depDAO.insertDep(DepNo, DepName, DepHead, DepLocal)) {
                JOptionPane.showMessageDialog(this, "Cannot Insert! Please try again!", "DEPARTMENT MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Insert new department successfully!", "DEPARTMENT MASTER", JOptionPane.INFORMATION_MESSAGE);

            checkDepInputCode(txtDepInputCode.getText().trim(), lblDepInsertCode, btnDepStart, lblDepCheckInputCode);
            disablePanelInfo(pnlDepInfor, pnlDepHead);
            txtDepInputCode.requestFocus();
            return;
        }

        if (btnDepInsert.getText().equals("UPDATE")) {
            if (!validateDepInsert()) {
                return;
            }

            int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to update this deparment?", "DEPARTMENT MASTER", JOptionPane.YES_NO_OPTION);
            if (choice == JOptionPane.NO_OPTION) {
                return;
            }

            int DepNo = Integer.parseInt(txtDepNo.getText().trim());
            String DepName = txtDepName.getText().trim();
            String DepHead = txtDepHead.getText().trim();
            String DepLocal = txtDepLocation.getText().trim();

            if (!depDAO.updateDep(DepNo, DepName, DepHead, DepLocal)) {
                JOptionPane.showMessageDialog(this, "Cannot edit! Please try again!", "DEPARTMENT MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Update department successfully!", "DEPARTMENT MASTER", JOptionPane.INFORMATION_MESSAGE);

            checkDepInputCode(txtDepInputCode.getText().trim(), lblDepInsertCode, btnDepStart, lblDepCheckInputCode);
            disablePanelInfo(pnlDepInfor, pnlDepHead);
            txtDepInputCode.requestFocus();
            return;
        }
    }//GEN-LAST:event_btnDepInsertActionPerformed

    private void btnDesStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDesStartActionPerformed
        showChoice(pnlDesHead, pnlDesBody, pnlDesInfor);
        enablePanelInfor(pnlDesInfor, pnlDesHead);
        txtDesId.setEditable(false);
        if (lblDesInsertCode.getText().equals("NEW CODE")) {
            txtDesId.setText(txtDesInputCode.getText());
        }
        txtDesName.requestFocus();
    }//GEN-LAST:event_btnDesStartActionPerformed

    private void btnDesViewTableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDesViewTableActionPerformed
        showChoice(pnlDesHead, pnlDesBody, pnlDesTable);
        tblDes.setModel(desDAO.loadTableDes());
        tblDes.setSelectionMode(0);
        enablePanelInfor(pnlDesTable, pnlDesHead);
        btnDesTableOk.setEnabled(false);

    }//GEN-LAST:event_btnDesViewTableActionPerformed

    private void txtDesInputCodeKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtDesInputCodeKeyReleased
        String desCode = txtDesInputCode.getText().trim();
        checkDesInputCode(txtDesInputCode.getText().trim(), lblDesInsertCode, btnDesStart, lblDesCheckInputCode);
    }//GEN-LAST:event_txtDesInputCodeKeyReleased

    private void btnDepStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDepStartActionPerformed
        showChoice(pnlDepHead, pnlDepBody, pnlDepInfor);
        enablePanelInfor(pnlDepInfor, pnlDepHead);
        txtDepNo.setEditable(false);
        if (lblDepInsertCode.getText().equals("NEW CODE")) {
            txtDepNo.setText(txtDepInputCode.getText());
        }
        txtDepName.requestFocus();
    }//GEN-LAST:event_btnDepStartActionPerformed

    private void btnDepViewTableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDepViewTableActionPerformed
        showChoice(pnlDepHead, pnlDepBody, pnlDepTable);
        tblDep.setModel(depDAO.loadTableDep());
        tblDep.setSelectionMode(0);
        enablePanelInfor(pnlDepTable, pnlDepHead);
        btnDepTableOk.setEnabled(false);
    }//GEN-LAST:event_btnDepViewTableActionPerformed

    private void txtDepInputCodeKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtDepInputCodeKeyReleased
        checkDepInputCode(txtDepInputCode.getText().trim(), lblDepInsertCode, btnDepStart, lblDepCheckInputCode);
    }//GEN-LAST:event_txtDepInputCodeKeyReleased

    private void btnEditUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditUserActionPerformed
        signOut();
    }//GEN-LAST:event_btnEditUserActionPerformed

    private void btnMasterUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMasterUserActionPerformed
        closeAllConnect();
        userDAO = new UserDAO();
        userConnect = true;

        showChoice(pnlUserHead, pnlUserBody, pnlUserInfor);
        disablePanelInfo(pnlUserInfor, pnlUserHead);
        userDAO.loadUserCombobox(cbUserEmpId, cbUserAccLevel);
        checkUserInputCode(txtUserInputCode.getText().trim(), lblUserInsertCode, btnUserStart, lblUserCheckInputCode);
        txtUserInputCode.requestFocus();
    }//GEN-LAST:event_btnMasterUserActionPerformed

    private void btnMasterSecActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMasterSecActionPerformed
        closeAllConnect();
        secDAO = new SectionDAO();
        secConnect = true;

        showChoice(pnlSecHead, pnlSecBody, pnlSecInfor);
        disablePanelInfo(pnlSecInfor, pnlSecHead);
        secDAO.loadSecCombobox(cbSecDepNo);
        checkSecInputCode(txtSecInputCode.getText().trim(), lblSecInsertCode, btnSecStart, lblSecCheckInputCode);
        txtSecInputCode.requestFocus();
    }//GEN-LAST:event_btnMasterSecActionPerformed

    private void btnMasterVacActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMasterVacActionPerformed
        closeAllConnect();
        vacDAO = new VacancyDAO();
        vacConnect = true;

        showChoice(pnlVacHead, pnlVacBody, pnlVacInfor);
        disablePanelInfo(pnlVacInfor, pnlVacHead);
        //empDAO.loadEmpCombobox(cbEmpDepNo, cbEmpDesId, cbEmpSecId);
        vacDAO.loadVacCombobox(cbVacDepNo, cbVacDesId, cbVacSecId, cbVacStatus);
        checkVacInputCode(txtVacInputCode.getText(), lblVacInsertCode, btnVacStart, lblVacCheckInputCode);
        txtVacInputCode.requestFocus();
    }//GEN-LAST:event_btnMasterVacActionPerformed

    private void btnMasterDesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMasterDesActionPerformed
        closeAllConnect();
        desDAO = new DesignationDAO();
        desConnect = true;

        showChoice(pnlDesHead, pnlDesBody, pnlDesInfor);
        disablePanelInfo(pnlDesInfor, pnlDesHead);
        checkDesInputCode(txtDesInputCode.getText().trim(), lblDesInsertCode, btnDesStart, lblDesCheckInputCode);

        txtDesInputCode.requestFocus();
    }//GEN-LAST:event_btnMasterDesActionPerformed

    private void btnMasterEmpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMasterEmpActionPerformed
        closeAllConnect();
        empDAO = new EmployeeDAO();
        empConnect = true;

        showChoice(pnlEmpHead, pnlEmpBody, pnlEmpInfor);
        disablePanelInfo(pnlEmpInfor, pnlEmpHead);
        empDAO.loadEmpCombobox(cbEmpDepNo, cbEmpDesId, cbEmpSecId);
        checkEmpInputCode(txtEmpInputCode.getText().trim(), lblEmpInsertCode, btnEmpStart, lblEmpCheckInputCode);

        txtEmpInputCode.requestFocus();
    }//GEN-LAST:event_btnMasterEmpActionPerformed

    private void btnMasterDepActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMasterDepActionPerformed
        closeAllConnect();
        depDAO = new DepartmentDAO();
        depConnect = true;
        showChoice(pnlDepHead, pnlDepBody, pnlDepInfor);
        disablePanelInfo(pnlDepInfor, pnlDepHead);
        checkDepInputCode(txtDepInputCode.getText().trim(), lblDepInsertCode, btnDepStart, lblDepCheckInputCode);

        txtDepInputCode.requestFocus();
    }//GEN-LAST:event_btnMasterDepActionPerformed

    private void txtVacInputCodeKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtVacInputCodeKeyReleased
        checkVacInputCode(txtVacInputCode.getText(), lblVacInsertCode, btnVacStart, lblVacCheckInputCode);
    }//GEN-LAST:event_txtVacInputCodeKeyReleased

    private void btnVacViewTableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacViewTableActionPerformed
        showChoice(pnlVacHead, pnlVacBody, pnlVacTable);
        tblVac.setModel(vacDAO.loadTableVac());
        tblVac.setSelectionMode(0);
        enablePanelInfor(pnlVacTable, pnlVacHead);
        btnVacTableOk.setEnabled(false);
    }//GEN-LAST:event_btnVacViewTableActionPerformed

    private void btnVacStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacStartActionPerformed
        showChoice(pnlVacHead, pnlVacBody, pnlVacInfor);
        enablePanelInfor(pnlVacInfor, pnlVacHead);
        txtVacId.setEditable(false);
        cbVacDepNo.requestFocus();
        if (lblVacInsertCode.getText().equals("NEW CODE")) {
            txtVacId.setText(txtVacInputCode.getText());
        }

        cbVacDepNo.requestFocus();
    }//GEN-LAST:event_btnVacStartActionPerformed

    private void btnVacInsertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacInsertActionPerformed
        if (!validateVacInsert()) {
            return;
        }

        String VacID = txtVacId.getText().trim();
        String DepNo = cbVacDepNo.getSelectedItem().toString().trim();
        String SecID = cbVacSecId.getSelectedItem().toString().trim();
        String DesignID = cbVacDesId.getSelectedItem().toString().trim();
        String NoofVac = txtVacNoOf.getText().trim();
        String Status = cbVacStatus.getSelectedItem().toString().trim();
        String VacDate = txtVacDate.getText().trim();
        String Priority = txtVacPriority.getText().trim();

        Vector v = new Vector();
        v.add(VacID);
        v.add(DepNo);
        v.add(SecID);
        v.add(DesignID);
        v.add(NoofVac);
        v.add(Status);
        v.add(VacDate);
        v.add(Priority);

        if (btnVacInsert.getText().equals("INSERT")) {
            if (!vacDAO.insertVac(v)) {
                JOptionPane.showMessageDialog(this, "Cannot Insert! Please try again!", "VACANCY MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Insert new VACANCY successfully!", "VACANCY MASTER", JOptionPane.INFORMATION_MESSAGE);
        }

        if (btnVacInsert.getText().equals("UPDATE")) {
            if (!vacDAO.updatateVac(v)) {
                JOptionPane.showMessageDialog(this, "Cannot edit! Please try again!", "VACANCY MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }
            JOptionPane.showMessageDialog(this, "Update VACANCY successfully!", "VACANCY MASTER", JOptionPane.INFORMATION_MESSAGE);
        }

        checkVacInputCode(txtVacInputCode.getText(), lblVacInsertCode, btnVacStart, lblVacCheckInputCode);
        disablePanelInfo(pnlVacInfor, pnlVacHead);
        cbVacDepNo.requestFocus();
    }//GEN-LAST:event_btnVacInsertActionPerformed

    private void btnVacResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacResetActionPerformed
        if (btnVacReset.getText().equals("DELETE")) {
            int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to delete this Vacancy?", "VACANCY MASTER", JOptionPane.YES_NO_OPTION);
            if (choice == JOptionPane.NO_OPTION) {
                return;
            }

            String VacId = txtVacInputCode.getText().trim();

            if (!vacDAO.deleteVac(VacId)) {
                JOptionPane.showMessageDialog(this, "Cannot delete this Vacancy", "VACANCY MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Delete Vacancy successfully!", "VACANCY MASTER", JOptionPane.INFORMATION_MESSAGE);

            // Back to Master choice of Department
            showChoice(pnlVacHead, pnlVacBody, pnlVacInfor);
            disablePanelInfo(pnlVacInfor, pnlVacHead);
            checkVacInputCode(txtVacInputCode.getText(), lblVacInsertCode, btnVacStart, lblVacCheckInputCode);
            txtVacInputCode.requestFocus();
            return;
        }

        if (btnVacReset.getText().equals("RESET")) {
            resetAllTextField();
            cbVacDepNo.requestFocus();
        }
    }//GEN-LAST:event_btnVacResetActionPerformed

    private void btnVacCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacCancelActionPerformed
        int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to cancel this?", "VACANCY MASTER", JOptionPane.YES_NO_OPTION);
        if (choice == JOptionPane.NO_OPTION) {
            return;
        }

        disablePanelInfo(pnlVacInfor, pnlVacHead);
        txtVacInputCode.requestFocus();
        hideLabelCheck();
        if (btnVacInsert.getText().equals("INSERT")) {
            resetAllTextField();
            return;
        }

        loadVacToUpdate(txtVacInputCode.getText().trim());

    }//GEN-LAST:event_btnVacCancelActionPerformed

    private void tblVacMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblVacMouseClicked
        int rowChoose = tblVac.getSelectedRow();
        String codeChooce = tblVac.getValueAt(rowChoose, 0).toString();
        if (rowChoose == -1) {
            btnVacTableOk.setEnabled(false);
            return;
        }
        btnVacTableOk.setEnabled(true);
        if (evt.getClickCount() == 2) {
            if (rowChoose == -1) {
                return;
            }
            txtVacInputCode.setText(codeChooce);
            showChoice(pnlVacHead, pnlVacBody, pnlVacInfor);
            disablePanelInfo(pnlVacInfor, pnlVacHead);
            checkVacInputCode(txtVacInputCode.getText(), lblVacInsertCode, btnVacStart, lblVacCheckInputCode);
            txtVacInputCode.requestFocus();
        }
    }//GEN-LAST:event_tblVacMouseClicked

    private void txtVacInputCodeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtVacInputCodeActionPerformed
    }//GEN-LAST:event_txtVacInputCodeActionPerformed

    private void txtUserInputCodeKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtUserInputCodeKeyReleased
        checkUserInputCode(txtUserInputCode.getText().trim(), lblUserInsertCode, btnUserStart, lblUserCheckInputCode);
    }//GEN-LAST:event_txtUserInputCodeKeyReleased

    private void btnUserViewTableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUserViewTableActionPerformed
        showChoice(pnlUserHead, pnlUserBody, pnlUserTable);
        tblUser.setModel(userDAO.loadTableUser());
        tblUser.setSelectionMode(0);
        enablePanelInfor(pnlUserTable, pnlUserHead);
        btnUserTableOk.setEnabled(false);
    }//GEN-LAST:event_btnUserViewTableActionPerformed

    private void btnUserStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUserStartActionPerformed
        showChoice(pnlUserHead, pnlUserBody, pnlUserInfor);
        enablePanelInfor(pnlUserInfor, pnlUserHead);
        txtUsername.setEditable(false);
        pwfUserPass.requestFocus();
        if (lblUserInsertCode.getText().equals("NEW CODE")) {
            txtUsername.setText(txtUserInputCode.getText());
            userDAO.loadUserToInsert(cbUserEmpId, cbUserAccLevel);
            return;
        }
    }//GEN-LAST:event_btnUserStartActionPerformed

    private void btnUserInsertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUserInsertActionPerformed
        if (!validateUserInsert()) {
            return;
        }

        String username = txtUsername.getText().trim();
        String password = new String(pwfUserPass.getPassword());
        String userEmpId = cbUserEmpId.getSelectedItem().toString();
        String userAcclevel = cbUserAccLevel.getSelectedItem().toString();
        Vector<String> userData = new Vector<String>();

        userData.add(username);
        userData.add(password);

        if (userAcclevel.equals("Admin")) {
            userData.add("A");
        } else {
            userData.add("U");
        }

        userData.add(userEmpId);

        if (btnUserInsert.getText().equals("INSERT")) {
            if (!userDAO.insertUser(userData)) {
                JOptionPane.showMessageDialog(this, "Cannot Insert! Please try again!", "USER ACCOUNT MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Insert new USER ACCOUNT successfully!", "USER ACCOUNT MASTER", JOptionPane.INFORMATION_MESSAGE);
        }

        if (btnUserInsert.getText().equals("UPDATE")) {
            if (!userDAO.updateUser(userData)) {
                JOptionPane.showMessageDialog(this, "Cannot edit! Please try again!", "USER ACCOUNT MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }
            JOptionPane.showMessageDialog(this, "Update USER ACCOUNT successfully!", "USER ACCOUNT MASTER", JOptionPane.INFORMATION_MESSAGE);
        }

        checkUserInputCode(txtUserInputCode.getText().trim(), lblUserInsertCode, btnUserStart, lblUserCheckInputCode);
        disablePanelInfo(pnlUserInfor, pnlUserHead);
        txtUserInputCode.requestFocus();
    }//GEN-LAST:event_btnUserInsertActionPerformed

    private void btnUserResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUserResetActionPerformed
        if (btnUserReset.getText().equals("DELETE")) {
            int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to delete this User account?", "USER ACCOUNT MASTER", JOptionPane.YES_NO_OPTION);
            if (choice == JOptionPane.NO_OPTION) {
                return;
            }

            String username = txtUserInputCode.getText().trim();

            if (!userDAO.deleteUser(username)) {
                JOptionPane.showMessageDialog(this, "Cannot delete this User account", "USER ACCOUNT MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Delete User account successfully!", "USER ACCOUNT MASTER", JOptionPane.INFORMATION_MESSAGE);

            // Back to Master choice of Department
            showChoice(pnlUserHead, pnlUserBody, pnlUserInfor);
            disablePanelInfo(pnlUserInfor, pnlUserHead);
            checkUserInputCode(txtUserInputCode.getText().trim(), lblUserInsertCode, btnUserStart, lblUserCheckInputCode);
            txtUserInputCode.requestFocus();
            return;
        }

        if (btnUserReset.getText().equals("RESET")) {
            resetAllTextField();
            pwfUserPass.requestFocus();
        }
    }//GEN-LAST:event_btnUserResetActionPerformed

    private void btnUserCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUserCancelActionPerformed
        int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to cancel this?", "VACANCY MASTER", JOptionPane.YES_NO_OPTION);
        if (choice == JOptionPane.NO_OPTION) {
            return;
        }

        disablePanelInfo(pnlUserInfor, pnlUserHead);
        txtUserInputCode.requestFocus();
        hideLabelCheck();
        if (btnUserInsert.getText().equals("INSERT")) {
            resetAllTextField();
            return;
        }

        loadUserToUpdate(txtUserInputCode.getText().trim());

    }//GEN-LAST:event_btnUserCancelActionPerformed

    private void tblUserMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblUserMouseClicked
        int rowChoose = tblUser.getSelectedRow();
        String codeChooce = tblUser.getValueAt(rowChoose, 0).toString();
        if (rowChoose == -1) {
            btnUserTableOk.setEnabled(false);
            return;
        }
        btnUserTableOk.setEnabled(true);
        if (evt.getClickCount() == 2) {
            if (rowChoose == -1) {
                return;
            }
            txtUserInputCode.setText(codeChooce);
            showChoice(pnlUserHead, pnlUserBody, pnlUserInfor);
            disablePanelInfo(pnlUserInfor, pnlUserHead);
            checkUserInputCode(txtUserInputCode.getText().trim(), lblUserInsertCode, btnUserStart, lblUserCheckInputCode);
            txtUserInputCode.requestFocus();
        }
    }//GEN-LAST:event_tblUserMouseClicked

    private void txtSecInputCodeKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSecInputCodeKeyReleased
        checkSecInputCode(txtSecInputCode.getText().trim(), lblSecInsertCode, btnSecStart, lblSecCheckInputCode);
    }//GEN-LAST:event_txtSecInputCodeKeyReleased

    private void btnSecViewTableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSecViewTableActionPerformed
        showChoice(pnlSecHead, pnlSecBody, pnlSecTable);
        tblSec.setModel(secDAO.loadTableSec());
        tblSec.setSelectionMode(0);
        enablePanelInfor(pnlSecTable, pnlSecHead);
        btnSecTableOk.setEnabled(false);
    }//GEN-LAST:event_btnSecViewTableActionPerformed

    private void btnSecStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSecStartActionPerformed
        showChoice(pnlSecHead, pnlSecBody, pnlSecInfor);
        enablePanelInfor(pnlSecInfor, pnlSecHead);
        txtSecId.setEditable(false);
        txtSecName.requestFocus();
        if (lblSecInsertCode.getText().equals("NEW CODE")) {
            txtSecId.setText(txtSecInputCode.getText());
        }
        txtSecName.requestFocus();
    }//GEN-LAST:event_btnSecStartActionPerformed

    private void btnSecInsertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSecInsertActionPerformed
        if (!validateSecInsert()) {
            return;
        }

        String secId = txtSecId.getText().trim();
        String secName = txtSecName.getText().trim();
        String secInch = txtSecInch.getText().trim();
        String secDepNo = cbSecDepNo.getSelectedItem().toString();

        Vector<String> secData = new Vector();
        secData.add(secId);
        secData.add(secName);
        secData.add(secInch);
        secData.add(secDepNo);

        if (btnSecInsert.getText().equals("INSERT")) {
            if (!secDAO.insertSec(secData)) {
                JOptionPane.showMessageDialog(this, "Cannot Insert! Please try again!", "SECTION MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Insert new SECTION successfully!", "SECTION MASTER", JOptionPane.INFORMATION_MESSAGE);
        }

        if (btnSecInsert.getText().equals("UPDATE")) {
            int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to update this Section?", "SECTION MASTER", JOptionPane.YES_NO_OPTION);
            if (choice == JOptionPane.NO_OPTION) {
                return;
            }

            if (!secDAO.updateSec(secData)) {
                JOptionPane.showMessageDialog(this, "Cannot edit! Please try again!", "SECTION MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }
            JOptionPane.showMessageDialog(this, "Update SECTION successfully!", "SECTION MASTER", JOptionPane.INFORMATION_MESSAGE);
        }
        disablePanelInfo(pnlSecInfor, pnlSecHead);
        checkSecInputCode(txtSecInputCode.getText().trim(), lblSecInsertCode, btnSecStart, lblSecCheckInputCode);
        txtSecInputCode.requestFocus();
    }//GEN-LAST:event_btnSecInsertActionPerformed

    private void btnSecResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSecResetActionPerformed
        if (btnSecReset.getText().equals("DELETE")) {
            int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to delete this SECTION?", "SECTION MASTER", JOptionPane.YES_NO_OPTION);
            if (choice == JOptionPane.NO_OPTION) {
                return;
            }

            String secId = txtSecInputCode.getText().trim();

            if (!secDAO.deleteSec(secId)) {
                JOptionPane.showMessageDialog(this, "Cannot delete this SECTION\n Please delete Vacancy and Employee have this Section first", "SECTION MASTER", JOptionPane.ERROR_MESSAGE);
                return;
            }

            JOptionPane.showMessageDialog(this, "Delete SECTION successfully!", "SECTION MASTER", JOptionPane.INFORMATION_MESSAGE);

            // Back to Master choice of Department
            showChoice(pnlSecHead, pnlSecBody, pnlSecInfor);
            disablePanelInfo(pnlSecInfor, pnlSecHead);
            checkSecInputCode(txtSecInputCode.getText().trim(), lblSecInsertCode, btnSecStart, lblSecCheckInputCode);
            txtSecInputCode.requestFocus();
            return;
        }

        if (btnSecReset.getText().equals("RESET")) {
            resetAllTextField();
            txtSecName.requestFocus();
        }
    }//GEN-LAST:event_btnSecResetActionPerformed

    private void btnSecCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSecCancelActionPerformed
        int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to cancel this?", "SECTION MASTER", JOptionPane.YES_NO_OPTION);
        if (choice == JOptionPane.NO_OPTION) {
            return;
        }
        hideLabelCheck();
        txtSecInputCode.requestFocus();
        disablePanelInfo(pnlSecInfor, pnlSecHead);
        if (btnSecInsert.getText().equals("INSERT")) {
            resetAllTextField();
            return;
        }

        loadSecToUpdate(txtSecInputCode.getText().trim());
    }//GEN-LAST:event_btnSecCancelActionPerformed

    private void tblSecMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblSecMouseClicked
        int rowChoose = tblSec.getSelectedRow();
        String codeChooce = tblSec.getValueAt(rowChoose, 0).toString();
        if (rowChoose == -1) {
            btnSecTableOk.setEnabled(false);
            return;
        }
        btnSecTableOk.setEnabled(true);
        if (evt.getClickCount() == 2) {
            if (rowChoose == -1) {
                return;
            }
            txtSecInputCode.setText(codeChooce);
            showChoice(pnlSecHead, pnlSecBody, pnlSecInfor);
            disablePanelInfo(pnlSecInfor, pnlSecHead);
            checkSecInputCode(txtSecInputCode.getText().trim(), lblSecInsertCode, btnSecStart, lblSecCheckInputCode);
            txtSecInputCode.requestFocus();
        }
    }//GEN-LAST:event_tblSecMouseClicked

    private void mniDepActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniDepActionPerformed
        closeAllConnect();
        depDAO = new DepartmentDAO();
        depConnect = true;

        showAll();
        showChoice(pnlDepHead, pnlDepBody, pnlDepInfor);
        disablePanelInfo(pnlDepInfor, pnlDepHead);
        checkDepInputCode(txtDepInputCode.getText().trim(), lblDepInsertCode, btnDepStart, lblDepCheckInputCode);
        txtDepInputCode.requestFocus();
    }//GEN-LAST:event_mniDepActionPerformed

    private void mniEmpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniEmpActionPerformed
        closeAllConnect();
        empDAO = new EmployeeDAO();
        empConnect = true;

        showAll();
        showChoice(pnlEmpHead, pnlEmpBody, pnlEmpInfor);
        disablePanelInfo(pnlEmpInfor, pnlEmpHead);
        empDAO.loadEmpCombobox(cbEmpDepNo, cbEmpDesId, cbEmpSecId);
        checkEmpInputCode(txtEmpInputCode.getText().trim(), lblEmpInsertCode, btnEmpStart, lblEmpCheckInputCode);
        txtEmpInputCode.requestFocus();
    }//GEN-LAST:event_mniEmpActionPerformed

    private void mniDesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniDesActionPerformed
        closeAllConnect();
        desDAO = new DesignationDAO();
        desConnect = true;

        showAll();
        showChoice(pnlDesHead, pnlDesBody, pnlDesInfor);
        disablePanelInfo(pnlDesInfor, pnlDesHead);
        checkDesInputCode(txtDesInputCode.getText().trim(), lblDesInsertCode, btnDesStart, lblDesCheckInputCode);

        txtDesInputCode.requestFocus();
    }//GEN-LAST:event_mniDesActionPerformed

    private void mniVacActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniVacActionPerformed
        closeAllConnect();
        vacDAO = new VacancyDAO();
        vacConnect = true;

        showAll();
        showChoice(pnlVacHead, pnlVacBody, pnlVacInfor);
        disablePanelInfo(pnlVacInfor, pnlVacHead);
        //empDAO.loadEmpCombobox(cbEmpDepNo, cbEmpDesId, cbEmpSecId);
        vacDAO.loadVacCombobox(cbVacDepNo, cbVacDesId, cbVacSecId, cbVacStatus);
        checkVacInputCode(txtVacInputCode.getText(), lblVacInsertCode, btnVacStart, lblVacCheckInputCode);
        txtVacInputCode.requestFocus();
    }//GEN-LAST:event_mniVacActionPerformed

    private void mniSecActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniSecActionPerformed
        closeAllConnect();
        secDAO = new SectionDAO();
        secConnect = true;

        showAll();
        showChoice(pnlSecHead, pnlSecBody, pnlSecInfor);
        disablePanelInfo(pnlSecInfor, pnlSecHead);
        secDAO.loadSecCombobox(cbSecDepNo);
        checkSecInputCode(txtSecInputCode.getText().trim(), lblSecInsertCode, btnSecStart, lblSecCheckInputCode);
        txtSecInputCode.requestFocus();
    }//GEN-LAST:event_mniSecActionPerformed

    private void mniUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniUserActionPerformed
        closeAllConnect();
        userDAO = new UserDAO();
        userConnect = true;

        showAll();
        showChoice(pnlUserHead, pnlUserBody, pnlUserInfor);
        disablePanelInfo(pnlUserInfor, pnlUserHead);
        userDAO.loadUserCombobox(cbUserEmpId, cbUserAccLevel);
        checkUserInputCode(txtUserInputCode.getText().trim(), lblUserInsertCode, btnUserStart, lblUserCheckInputCode);
        txtUserInputCode.requestFocus();
    }//GEN-LAST:event_mniUserActionPerformed

    private void mniExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniExitActionPerformed
        System.exit(0);
    }//GEN-LAST:event_mniExitActionPerformed

    private void mniVacFillActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniVacFillActionPerformed
        closeAllConnect();
        vacFillDAO = new VacancyFillDAO();
        vacFillConnect = true;

        showOrg();
        showMasterOrg(pnlOrg_VacFill, pnlVacFill_Bottom);
        lblVacFillEmpId.setText(empId);
        checkVacId();
        checkVacFillInputCode(txtVacFillInputCode.getText().trim(), lblVacFillCheckInputCode, btnVacFillStart);

        // set Date
        txtVacFillDate.setText(toDay);
        txtVacFillDate.setEditable(false);
        txtVacFillInputCode.setEditable(false);
        txtVacFillInputCode.requestFocus();
    }//GEN-LAST:event_mniVacFillActionPerformed

    private void mniJobRoleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniJobRoleActionPerformed
        closeAllConnect();
        jobDAO = new JobDAO();
        jobConnect = true;

        showOrg();

        showMasterOrg(pnlOrg_JobRotation, pnlJobRotation_Bottom);
        checkRadioBtnJobRoation();

        //checkJobInputCode();
    }//GEN-LAST:event_mniJobRoleActionPerformed

    private void mniOrgActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniOrgActionPerformed
        closeAllConnect();
        orgDAO = new OrgDAO();
        orgConnect = true;

        showOrg();

        showMasterOrg(pnlOrg_Hierachy, pnlJobRotation_Bottom);

        listOrgDep.setListData(orgDAO.loadListDep());
        tblOrg.setDragEnabled(false);
        tblOrg.setSelectionMode(0);
    }//GEN-LAST:event_mniOrgActionPerformed

    private void mniAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniAboutActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_mniAboutActionPerformed

    private void mniEmpHierachyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniEmpHierachyActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_mniEmpHierachyActionPerformed

    private void mnuOrganizationMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mnuOrganizationMouseClicked
        if (!mnuOrganization.isEnabled()) {
            return;
        }
        showOrg();
        pnlOrg_VacFill.setVisible(false);
        pnlOrg_JobRotation.setVisible(false);
        pnlOrg_Main.setVisible(false);
        vacFillDAO = new VacancyFillDAO();

    }//GEN-LAST:event_mnuOrganizationMouseClicked

    private void btnVacFillMasterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacFillMasterActionPerformed
        closeAllConnect();
        vacFillDAO = new VacancyFillDAO();
        vacFillConnect = true;

        showMasterOrg(pnlOrg_VacFill, pnlVacFill_Bottom);
        lblVacFillEmpId.setText(empId);

        checkVacId();
        checkVacFillInputCode(txtVacFillInputCode.getText().trim(), lblVacFillCheckInputCode, btnVacFillStart);

        // set Date
        txtVacFillDate.setText(toDay);
        txtVacFillDate.setEditable(false);
        txtVacFillInputCode.setEditable(false);
        txtVacFillInputCode.requestFocus();
    }//GEN-LAST:event_btnVacFillMasterActionPerformed

    private void btnJobMasterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnJobMasterActionPerformed
        closeAllConnect();
        jobDAO = new JobDAO();
        jobConnect = true;

        showOrg();

        showMasterOrg(pnlOrg_JobRotation, pnlJobRotation_Bottom);
        checkRadioBtnJobRoation();

//        checkJobInputCode();

    }//GEN-LAST:event_btnJobMasterActionPerformed

    private void btnOrgMasterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOrgMasterActionPerformed
        closeAllConnect();
        orgDAO = new OrgDAO();
        orgConnect = true;

        showMasterOrg(pnlOrg_Hierachy, pnlJobRotation_Bottom);
        listOrgDep.setListData(orgDAO.loadListDep());
        tblOrg.setDragEnabled(false);
        tblOrg.setSelectionMode(0);
        //JobCheckCbSelectChange();

        //checkJobInputCode();
    }//GEN-LAST:event_btnOrgMasterActionPerformed

    private void btnHierachyMasterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnHierachyMasterActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnHierachyMasterActionPerformed

    private void btnMasterSec1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMasterSec1ActionPerformed
//        closeAllConnect();
//        vacFillDAO = new VacancyFillDAO();
//        vacFillConnect = true;

//    pnlConfirmVacpId1.setText(empId);
//        checkVacId();
//        checkVacFillInputCode(txtVacFillInputCode.getText().trim(), lblVacFillCheckInputCode, btnVacFillStart);
        // set Date
//        txtVacFillDate.setText(toDay);
//        txtVacFillDate.setEditable(false);
//        txtVacFillInputCode.setEditable(false);
//        txtVacFillInputCode.requestFocus();
    }//GEN-LAST:event_btnMasterSec1ActionPerformed

    private void btnEditUser1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditUser1ActionPerformed
        signOut();
    }//GEN-LAST:event_btnEditUser1ActionPerformed

    private void mnuMasterMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mnuMasterMouseClicked
        if (!mnuMaster.isEnabled()) {
            return;
        }
        showAll();
    }//GEN-LAST:event_mnuMasterMouseClicked

    private void txtVacFillInputCodeMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtVacFillInputCodeMouseReleased
    }//GEN-LAST:event_txtVacFillInputCodeMouseReleased

    private void txtVacFillInputCodeKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtVacFillInputCodeKeyReleased
        checkVacFillInputCode(txtVacFillInputCode.getText().trim(), lblVacFillCheckInputCode, btnVacFillStart);
    }//GEN-LAST:event_txtVacFillInputCodeKeyReleased

    private void btnVacFillViewTableVacActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacFillViewTableVacActionPerformed
        ChooseVac_Table cvtbl = new ChooseVac_Table(this, true);
        cvtbl.setVisible(true);

        txtVacFillInputCode.setText(cvtbl.getVacId());
        checkVacFillInputCode(txtVacFillInputCode.getText().trim(), lblVacFillCheckInputCode, btnVacFillStart);
        btnVacTableOk.setEnabled(false);

        txtVacFillInputCode.requestFocus();
    }//GEN-LAST:event_btnVacFillViewTableVacActionPerformed

    private void btnVacFillStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacFillStartActionPerformed
        disablePaneInfor(pnlVacFill_Head);
        enablePanelInfor(pnlVacFill_Bottom);

    }//GEN-LAST:event_btnVacFillStartActionPerformed

    private void btnVacFillCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacFillCancelActionPerformed
        int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to cancel this?", "VACANCY FILL DETAILS", JOptionPane.YES_NO_OPTION);
        if (choice == JOptionPane.NO_OPTION) {
            return;
        }

        enablePanelInfor(pnlVacFill_Head);
        showMasterOrg(pnlOrg_VacFill, pnlVacFill_Bottom);

        checkVacId();
        checkVacFillInputCode(txtVacFillInputCode.getText().trim(), lblVacFillCheckInputCode, btnVacFillStart);
    }//GEN-LAST:event_btnVacFillCancelActionPerformed

    private void btnVacFillInsertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacFillInsertActionPerformed
        String btnText = btnVacFillInsert.getText();

        String vacId = txtVacFillInputCode.getText().trim();
        String dateChoose = txtVacFillDate.getText().trim();
        String intake = txaVacFillIntake.getText().trim();

        Vector<String> vecVacFillData = new Vector();
        vecVacFillData.add(vacId);
        vecVacFillData.add(this.empId);
        vecVacFillData.add(dateChoose);
        vecVacFillData.add(intake);

        if (btnText.equals("INSERT")) {
            if (!validateVacFillInsert()) {
                return;
            }

            if (!vacFillDAO.insertVacFill(vecVacFillData)) {
                JOptionPane.showMessageDialog(this, "Cannot add new! Please check code");
                return;
            }

            JOptionPane.showMessageDialog(this, "Add new Vacancy Fill Details successfully!");
            enablePanelInfor(pnlVacFill_Head);
            showMasterOrg(pnlOrg_VacFill, pnlVacFill_Bottom);
            checkVacId();
            checkVacFillInputCode(txtVacFillInputCode.getText().trim(), lblVacFillCheckInputCode, btnVacFillStart);
        } else {    // UPDATE
            if (!validateVacFillInsert()) {
                return;
            }

            if (!vacFillDAO.updateVacFill(vecVacFillData)) {
                JOptionPane.showMessageDialog(this, "Can not update, Please check code");
                return;
            }

            JOptionPane.showMessageDialog(this, "Update Your Vacancy Fill Details successfully!");
            enablePanelInfor(pnlVacFill_Head);
            showMasterOrg(pnlOrg_VacFill, pnlVacFill_Bottom);
            checkVacId();
            checkVacFillInputCode(txtVacFillInputCode.getText().trim(), lblVacFillCheckInputCode, btnVacFillStart);
        }
    }//GEN-LAST:event_btnVacFillInsertActionPerformed

    private void btnVacFillResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacFillResetActionPerformed
        if (btnVacFillReset.getText().trim().equals("DELETE")) {
            int choice = JOptionPane.showConfirmDialog(this, "Are you sure to want to delete this Vacancy Fill Details?", "Delete Vacancy Fill Details", JOptionPane.YES_NO_OPTION);
            if (choice == JOptionPane.NO_OPTION) {
                return;
            }

            if (!vacFillDAO.deleteVacFill(empId)) {
                JOptionPane.showMessageDialog(this, "Cannot delete this Vacancy Fill Details");
                return;
            }

            JOptionPane.showMessageDialog(this, "Delete Your Vacancy Fill Details successfully!");

            enablePanelInfor(pnlVacFill_Head);
            showMasterOrg(pnlOrg_VacFill, pnlVacFill_Bottom);
            checkVacFillInputCode(txtVacFillInputCode.getText().trim(), lblVacFillCheckInputCode, btnVacFillStart);
        } else {
            txtVacFillDate.setText("");
            txaVacFillIntake.setText("");
        }
    }//GEN-LAST:event_btnVacFillResetActionPerformed

    private void btnDepTableOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDepTableOkActionPerformed
        int rowChoose = tblDep.getSelectedRow();
        String codeChooce = tblDep.getValueAt(rowChoose, 0).toString();

        txtDepInputCode.setText(codeChooce);
        showChoice(pnlDepHead, pnlDepBody, pnlDepInfor);
        disablePanelInfo(pnlDepInfor, pnlDepHead);
        checkDepInputCode(txtDepInputCode.getText().trim(), lblDepInsertCode, btnDepStart, lblDepCheckInputCode);
        txtDepInputCode.requestFocus();
    }//GEN-LAST:event_btnDepTableOkActionPerformed

    private void btnDepTableCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDepTableCancelActionPerformed
        showChoice(pnlDepHead, pnlDepBody, pnlDepInfor);
        disablePanelInfo(pnlDepInfor, pnlDepHead);
        checkDepInputCode(txtDepInputCode.getText().trim(), lblDepInsertCode, btnDepStart, lblDepCheckInputCode);
        txtDepInputCode.requestFocus();
    }//GEN-LAST:event_btnDepTableCancelActionPerformed

    private void btnEmpTableOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEmpTableOkActionPerformed
        int rowChoose = tblEmp.getSelectedRow();
        String codeChooce = tblEmp.getValueAt(rowChoose, 0).toString();

        if (rowChoose == -1) {
            return;
        }
        txtEmpInputCode.setText(codeChooce);
        showChoice(pnlEmpHead, pnlEmpBody, pnlEmpInfor);
        disablePanelInfo(pnlEmpInfor, pnlEmpHead);
        checkEmpInputCode(txtEmpInputCode.getText().trim(), lblEmpInsertCode, btnEmpStart, lblEmpCheckInputCode);
        txtEmpInputCode.requestFocus();
    }//GEN-LAST:event_btnEmpTableOkActionPerformed

    private void btnEmpTableCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEmpTableCancelActionPerformed
        showChoice(pnlEmpHead, pnlEmpBody, pnlEmpInfor);
        disablePanelInfo(pnlEmpTable, pnlEmpHead);
        checkEmpInputCode(txtEmpInputCode.getText().trim(), lblEmpInsertCode, btnEmpStart, lblEmpCheckInputCode);
        txtEmpInputCode.requestFocus();
    }//GEN-LAST:event_btnEmpTableCancelActionPerformed

    private void btnDesTableCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDesTableCancelActionPerformed
        showChoice(pnlDesHead, pnlDesBody, pnlDesInfor);
        disablePanelInfo(pnlDesTable, pnlDesHead);
        checkDesInputCode(txtDesInputCode.getText().trim(), lblDesInsertCode, btnDesStart, lblDesCheckInputCode);
        txtDesInputCode.requestFocus();
    }//GEN-LAST:event_btnDesTableCancelActionPerformed

    private void btnDesTableOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDesTableOkActionPerformed
        int rowChoose = tblDes.getSelectedRow();
        String codeChooce = tblDes.getValueAt(rowChoose, 0).toString();

        if (rowChoose == -1) {
            return;
        }
        txtDesInputCode.setText(codeChooce);
        showChoice(pnlDesHead, pnlDesBody, pnlDesInfor);
        disablePanelInfo(pnlDesInfor, pnlDesHead);
        checkDesInputCode(txtDesInputCode.getText().trim(), lblDesInsertCode, btnDesStart, lblDesCheckInputCode);
        txtDesInputCode.requestFocus();

    }//GEN-LAST:event_btnDesTableOkActionPerformed

    private void btnVacTableOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacTableOkActionPerformed
        int rowChoose = tblVac.getSelectedRow();
        String codeChooce = tblVac.getValueAt(rowChoose, 0).toString();

        if (rowChoose == -1) {
            return;
        }
        txtVacInputCode.setText(codeChooce);
        showChoice(pnlVacHead, pnlVacBody, pnlVacInfor);
        disablePanelInfo(pnlVacInfor, pnlVacHead);
        checkVacInputCode(txtVacInputCode.getText().trim(), lblVacInsertCode, btnVacStart, lblVacCheckInputCode);
        txtVacInputCode.requestFocus();
    }//GEN-LAST:event_btnVacTableOkActionPerformed

    private void btnVacTableCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacTableCancelActionPerformed
        showChoice(pnlVacHead, pnlVacBody, pnlVacInfor);
        disablePanelInfo(pnlVacTable, pnlVacHead);
        checkVacInputCode(txtVacInputCode.getText().trim(), lblVacInsertCode, btnVacStart, lblVacCheckInputCode);
        txtVacInputCode.requestFocus();
    }//GEN-LAST:event_btnVacTableCancelActionPerformed

    private void btnSecTableOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSecTableOkActionPerformed
        int rowChoose = tblSec.getSelectedRow();
        String codeChooce = tblSec.getValueAt(rowChoose, 0).toString();

        if (rowChoose == -1) {
            return;
        }
        txtSecInputCode.setText(codeChooce);
        showChoice(pnlSecHead, pnlSecBody, pnlSecInfor);
        disablePanelInfo(pnlSecInfor, pnlSecHead);
        checkSecInputCode(txtSecInputCode.getText().trim(), lblSecInsertCode, btnSecStart, lblSecCheckInputCode);
        txtSecInputCode.requestFocus();
    }//GEN-LAST:event_btnSecTableOkActionPerformed

    private void btnSecTableCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSecTableCancelActionPerformed
        showChoice(pnlSecHead, pnlSecBody, pnlSecInfor);
        disablePanelInfo(pnlSecTable, pnlSecHead);
        checkSecInputCode(txtSecInputCode.getText().trim(), lblSecInsertCode, btnSecStart, lblSecCheckInputCode);
        txtSecInputCode.requestFocus();
    }//GEN-LAST:event_btnSecTableCancelActionPerformed

    private void btnUserTableOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUserTableOkActionPerformed
        int rowChoose = tblUser.getSelectedRow();
        String codeChooce = tblUser.getValueAt(rowChoose, 0).toString();

        if (rowChoose == -1) {
            return;
        }
        txtUserInputCode.setText(codeChooce);
        showChoice(pnlUserHead, pnlUserBody, pnlUserInfor);
        disablePanelInfo(pnlUserInfor, pnlUserHead);
        checkUserInputCode(txtUserInputCode.getText().trim(), lblUserInsertCode, btnUserStart, lblUserCheckInputCode);
        txtUserInputCode.requestFocus();
    }//GEN-LAST:event_btnUserTableOkActionPerformed

    private void btnUserTableCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUserTableCancelActionPerformed
        showChoice(pnlUserHead, pnlUserBody, pnlUserInfor);
        disablePanelInfo(pnlUserTable, pnlUserHead);
        checkUserInputCode(txtUserInputCode.getText().trim(), lblUserInsertCode, btnUserStart, lblUserCheckInputCode);
        txtUserInputCode.requestFocus();
    }//GEN-LAST:event_btnUserTableCancelActionPerformed

    private void btnEmpStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEmpStartActionPerformed
        showChoice(pnlEmpHead, pnlEmpBody, pnlEmpInfor);
        enablePanelInfor(pnlEmpInfor, pnlEmpHead);
        txtEmpId.setEditable(false);
        if (lblEmpInsertCode.getText().equals("NEW CODE")) {
            txtEmpId.setText(txtEmpInputCode.getText());
        }
        txtEmpName.requestFocus();
    }//GEN-LAST:event_btnEmpStartActionPerformed

    private void btnEmpViewTableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEmpViewTableActionPerformed
        showChoice(pnlEmpHead, pnlEmpBody, pnlEmpTable);
        enablePanelInfor(pnlEmpTable, pnlEmpHead);
        tblEmp.setModel(empDAO.loadTableEmp());
        tblEmp.setSelectionMode(0);
        btnEmpTableOk.setEnabled(false);
    }//GEN-LAST:event_btnEmpViewTableActionPerformed

    private void txtEmpInputCodeKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtEmpInputCodeKeyReleased
        checkEmpInputCode(txtEmpInputCode.getText().trim(), lblEmpInsertCode, btnEmpStart, lblEmpCheckInputCode);
    }//GEN-LAST:event_txtEmpInputCodeKeyReleased

    private void btnVacPickDateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVacPickDateActionPerformed
        CalendarDAO cal = new CalendarDAO(this);
        txtVacDate.setText(cal.setPickedDate());

    }//GEN-LAST:event_btnVacPickDateActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        CalendarDAO cal = new CalendarDAO(this);
        txtVacFillDate.setText(cal.setPickedDate());
    }//GEN-LAST:event_jButton2ActionPerformed

    private void listOrgDepMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_listOrgDepMouseClicked
        int n = listOrgDep.getSelectedIndex();
        if (n == -1) {
            return;
        }

        int depNo = Integer.parseInt(listOrgDep.getSelectedValue().toString());
        String select = "";

        if (rdbOrgEmp.isSelected()) {
            select = "emp";
        } else if (rdbOrgSec.isSelected()) {
            select = "sec";
        } else {
            select = "vac";
        }

        loadTableOrg(depNo, select);
    }//GEN-LAST:event_listOrgDepMouseClicked

    private void rdbOrgEmpItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rdbOrgEmpItemStateChanged
        if (!rdbOrgEmp.isSelected()) {
            return;
        }
        int n = listOrgDep.getSelectedIndex();
        if (n == -1) {
            return;
        }
        int depNo = Integer.parseInt(listOrgDep.getSelectedValue().toString());
        String select = "emp";
        loadTableOrg(depNo, select);
    }//GEN-LAST:event_rdbOrgEmpItemStateChanged

    private void rdbOrgSecItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rdbOrgSecItemStateChanged
        if (!rdbOrgSec.isSelected()) {
            return;
        }
        int n = listOrgDep.getSelectedIndex();
        if (n == -1) {
            return;
        }
        int depNo = Integer.parseInt(listOrgDep.getSelectedValue().toString());
        String select = "sec";
        loadTableOrg(depNo, select);
    }//GEN-LAST:event_rdbOrgSecItemStateChanged

    private void rdbOrgVacItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rdbOrgVacItemStateChanged
        if (!rdbOrgVac.isSelected()) {
            return;
        }
        int n = listOrgDep.getSelectedIndex();
        if (n == -1) {
            return;
        }
        int depNo = Integer.parseInt(listOrgDep.getSelectedValue().toString());
        String select = "vac";
        loadTableOrg(depNo, select);
    }//GEN-LAST:event_rdbOrgVacItemStateChanged

    private void pwfLoginPasswordKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_pwfLoginPasswordKeyPressed
        int code = evt.getKeyCode();
        if (code == KeyEvent.VK_ENTER || code == KeyEvent.VK_TAB) {
            login();
        }


    }//GEN-LAST:event_pwfLoginPasswordKeyPressed

    private void rdbConfirmVacFillDetailsItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rdbConfirmVacFillDetailsItemStateChanged
        checkRadioBtnJobRoation();
    }//GEN-LAST:event_rdbConfirmVacFillDetailsItemStateChanged

    private void btnJobStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnJobStartActionPerformed
        if (rdbConfirmVacFillDetails.isSelected()) {
            ConfirmVacStart();
            txaJobConfirmVacRemark.requestFocus();
            loadConfirmVac();
        } else {
            EmergencyStart();
        }
    }//GEN-LAST:event_btnJobStartActionPerformed

    private void btnConfirmVacCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConfirmVacCancelActionPerformed
        disablePanelConfirmVac();
        resetFormConfirmVac();
        checkConfirmVacInputCode();
    }//GEN-LAST:event_btnConfirmVacCancelActionPerformed

    private void btnEmerCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEmerCancelActionPerformed
        disablePanelEmergency();
        resetFormEmergency();
        checkEmergencyInputCode();
    }//GEN-LAST:event_btnEmerCancelActionPerformed

    private void txtJobInputCodeKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtJobInputCodeKeyReleased
        if (rdbConfirmVacFillDetails.isSelected()) {
            checkConfirmVacInputCode();
        } else {
            checkEmergencyInputCode();
        }

    }//GEN-LAST:event_txtJobInputCodeKeyReleased

    private void txaJobConfirmVacRemarkFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txaJobConfirmVacRemarkFocusGained
        txaJobConfirmVacRemark.setBackground(Color.GREEN);
        txaJobConfirmVacRemark.selectAll();
    }//GEN-LAST:event_txaJobConfirmVacRemarkFocusGained

    private void txaJobConfirmVacRemarkFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txaJobConfirmVacRemarkFocusLost
        txaJobConfirmVacRemark.setBackground(Color.white);
    }//GEN-LAST:event_txaJobConfirmVacRemarkFocusLost

    private void btnConfirmVacOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConfirmVacOkActionPerformed
        if (!checkConfirmVacInsert()) {
            return;
        }

        Vector v = new Vector();
        String empId = txtJobInputCode.getText().trim();
        String status = "";
        String remark = txaJobConfirmVacRemark.getText().trim();

        if (rdbJobConfirmVacConfim.isSelected()) {
            status = "1";
        } else {
            status = "2";
        }
        v.add(empId);
        v.add(status);
        v.add(remark);

        if (!jobDAO.insertConfirmVac(v)) {
            JOptionPane.showMessageDialog(this, "Cannot insert this Confirm Vacancy Fill Details", "CONFIRM VACANCY FILL DETAILS", JOptionPane.ERROR_MESSAGE);
            return;
        }

        JOptionPane.showMessageDialog(this, "Confirm thisVacancy Fill Details successfully!", "CONFIRM VACANCY FILL DETAILS", JOptionPane.INFORMATION_MESSAGE);

        disablePanelConfirmVac();
        resetFormConfirmVac();
        checkConfirmVacInputCode();
    }//GEN-LAST:event_btnConfirmVacOkActionPerformed

    private void btnJobViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnJobViewActionPerformed
        if (rdbConfirmVacFillDetails.isSelected()) {
            JobRole_ChooseEmp cvtbl = new JobRole_ChooseEmp(this, true);
            cvtbl.setVisible(true);

            txtJobInputCode.setText(cvtbl.getEmpId());
            checkConfirmVacInputCode();
        } else {
            ChooseEmployee_Table ce = new ChooseEmployee_Table(this, true);
            ce.setVisible(true);
            
            txtJobInputCode.setText(ce.getEmpId());
            checkEmergencyInputCode();
        }
        
        txtJobInputCode.requestFocus();
    }//GEN-LAST:event_btnJobViewActionPerformed

    private void cbEmerDepItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbEmerDepItemStateChanged
        if (cbEmerDep.getItemCount() <= 0) {
            return;
        }
        if (cbEmerDep.getSelectedIndex() == 0) {
            cbEmerSec.removeAllItems();
            cbEmerSec.addItem("Please select...");
            return;
        }
        int depNo = Integer.parseInt(cbEmerDep.getSelectedItem().toString().split(" ")[0]);
        jobDAO.loadCbSec(cbEmerSec, depNo);
    }//GEN-LAST:event_cbEmerDepItemStateChanged

    private void btnEmerOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEmerOkActionPerformed
        if (!checkEmergencyInsert()) {
            return;
        }
        
        String empId = txtJobInputCode.getText().trim();
        String presDes = txtEmerDes.getText().trim();
        String depNo = cbEmerDep.getSelectedItem().toString().split(" ")[0];
        String secId = cbEmerSec.getSelectedItem().toString().split(" ")[0];
        String remark = txaEmergencyRemark.getText().trim();
        
        Vector v = new Vector();
        v.add(empId);
        v.add(presDes);
        v.add(depNo);
        v.add(secId);
        v.add(remark);
        
        if (!jobDAO.insertJob(v)) {
            JOptionPane.showMessageDialog(this, "Error: Cannot insert! Please try again", "JOB ROTATION", JOptionPane.ERROR_MESSAGE);
            return;
        }
        
        JOptionPane.showMessageDialog(this, "Rotate this employee to new Department was successfull!", "JOB ROTATION", JOptionPane.INFORMATION_MESSAGE);
        disablePanelEmergency();
        resetFormEmergency();
        checkEmergencyInputCode();
        
    }//GEN-LAST:event_btnEmerOkActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;

                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Main_Frm_3.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Main_Frm_3.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Main_Frm_3.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Main_Frm_3.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Main_Frm_3().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnConfirmVacCancel;
    private javax.swing.JButton btnConfirmVacOk;
    private javax.swing.JButton btnDepCancel;
    private javax.swing.JButton btnDepInsert;
    private javax.swing.JButton btnDepReset;
    private javax.swing.JButton btnDepStart;
    private javax.swing.JButton btnDepTableCancel;
    private javax.swing.JButton btnDepTableOk;
    private javax.swing.JButton btnDepViewTable;
    private javax.swing.JButton btnDesCancel;
    private javax.swing.JButton btnDesInsert;
    private javax.swing.JButton btnDesReset;
    private javax.swing.JButton btnDesStart;
    private javax.swing.JButton btnDesTableCancel;
    private javax.swing.JButton btnDesTableOk;
    private javax.swing.JButton btnDesViewTable;
    private javax.swing.JButton btnEditUser;
    private javax.swing.JButton btnEditUser1;
    private javax.swing.JButton btnEmerCancel;
    private javax.swing.JButton btnEmerOk;
    private javax.swing.JButton btnEmpCancel;
    private javax.swing.JButton btnEmpInsert;
    private javax.swing.JButton btnEmpReset;
    private javax.swing.JButton btnEmpStart;
    private javax.swing.JButton btnEmpTableCancel;
    private javax.swing.JButton btnEmpTableOk;
    private javax.swing.JButton btnEmpViewTable;
    private javax.swing.JButton btnHierachyMaster;
    private javax.swing.JButton btnJobConfirmVacNewShowMore;
    private javax.swing.JButton btnJobConfirmVacOldShowMore;
    private javax.swing.JButton btnJobMaster;
    private javax.swing.JButton btnJobStart;
    private javax.swing.JButton btnJobView;
    private javax.swing.JButton btnLogin;
    private javax.swing.JButton btnMasterDep;
    private javax.swing.JButton btnMasterDes;
    private javax.swing.JButton btnMasterEmp;
    private javax.swing.JButton btnMasterSec;
    private javax.swing.JButton btnMasterSec1;
    private javax.swing.JButton btnMasterUser;
    private javax.swing.JButton btnMasterVac;
    private javax.swing.JButton btnOrgMaster;
    private javax.swing.JButton btnSecCancel;
    private javax.swing.JButton btnSecInsert;
    private javax.swing.JButton btnSecReset;
    private javax.swing.JButton btnSecStart;
    private javax.swing.JButton btnSecTableCancel;
    private javax.swing.JButton btnSecTableOk;
    private javax.swing.JButton btnSecViewTable;
    private javax.swing.JButton btnUserCancel;
    private javax.swing.JButton btnUserInsert;
    private javax.swing.JButton btnUserReset;
    private javax.swing.JButton btnUserStart;
    private javax.swing.JButton btnUserTableCancel;
    private javax.swing.JButton btnUserTableOk;
    private javax.swing.JButton btnUserViewTable;
    private javax.swing.JButton btnVacCancel;
    private javax.swing.JButton btnVacFillCancel;
    private javax.swing.JButton btnVacFillInsert;
    private javax.swing.JButton btnVacFillMaster;
    private javax.swing.JButton btnVacFillReset;
    private javax.swing.JButton btnVacFillStart;
    private javax.swing.JButton btnVacFillViewTableVac;
    private javax.swing.JButton btnVacInsert;
    private javax.swing.JButton btnVacPickDate;
    private javax.swing.JButton btnVacReset;
    private javax.swing.JButton btnVacStart;
    private javax.swing.JButton btnVacTableCancel;
    private javax.swing.JButton btnVacTableOk;
    private javax.swing.JButton btnVacViewTable;
    private javax.swing.JComboBox cbEmerDep;
    private javax.swing.JComboBox cbEmerSec;
    private javax.swing.JComboBox cbEmpDepNo;
    private javax.swing.JComboBox cbEmpDesId;
    private javax.swing.JComboBox cbEmpSecId;
    private javax.swing.JComboBox cbSecDepNo;
    private javax.swing.JComboBox cbUserAccLevel;
    private javax.swing.JComboBox cbUserEmpId;
    private javax.swing.JComboBox cbVacDepNo;
    private javax.swing.JComboBox cbVacDesId;
    private javax.swing.JComboBox cbVacSecId;
    private javax.swing.JComboBox cbVacStatus;
    private javax.swing.ButtonGroup grdJobConfirm;
    private javax.swing.ButtonGroup grdOrgChooseTable;
    private javax.swing.ButtonGroup grdOrgVacFillConfirm;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel100;
    private javax.swing.JLabel jLabel101;
    private javax.swing.JLabel jLabel102;
    private javax.swing.JLabel jLabel103;
    private javax.swing.JLabel jLabel104;
    private javax.swing.JLabel jLabel105;
    private javax.swing.JLabel jLabel106;
    private javax.swing.JLabel jLabel107;
    private javax.swing.JLabel jLabel108;
    private javax.swing.JLabel jLabel109;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel110;
    private javax.swing.JLabel jLabel111;
    private javax.swing.JLabel jLabel112;
    private javax.swing.JLabel jLabel113;
    private javax.swing.JLabel jLabel114;
    private javax.swing.JLabel jLabel115;
    private javax.swing.JLabel jLabel116;
    private javax.swing.JLabel jLabel117;
    private javax.swing.JLabel jLabel118;
    private javax.swing.JLabel jLabel119;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel120;
    private javax.swing.JLabel jLabel121;
    private javax.swing.JLabel jLabel122;
    private javax.swing.JLabel jLabel123;
    private javax.swing.JLabel jLabel124;
    private javax.swing.JLabel jLabel125;
    private javax.swing.JLabel jLabel126;
    private javax.swing.JLabel jLabel128;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel82;
    private javax.swing.JLabel jLabel83;
    private javax.swing.JLabel jLabel89;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabel90;
    private javax.swing.JLabel jLabel91;
    private javax.swing.JLabel jLabel92;
    private javax.swing.JLabel jLabel96;
    private javax.swing.JLabel jLabel97;
    private javax.swing.JLabel jLabel98;
    private javax.swing.JLabel jLabel99;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    private javax.swing.JLabel jTitleEmpInfo;
    private javax.swing.JLabel jTitleEmpInfo1;
    private javax.swing.JLabel jlbEmpCode;
    private javax.swing.JLabel jlbVacCode;
    private javax.swing.JLabel jlblDepCode;
    private javax.swing.JLabel jlblDesCode;
    private javax.swing.JLabel jlblSelectDes;
    private javax.swing.JLabel jlblUsername;
    private javax.swing.JLabel jlblUsername1;
    private javax.swing.JLabel lblAcclevel;
    private javax.swing.JLabel lblAcclevel1;
    private javax.swing.JLabel lblCheckEmerDep;
    private javax.swing.JLabel lblCheckEmerSec;
    private javax.swing.JLabel lblCheckJobConfirmVac;
    private javax.swing.JLabel lblCheckJobInputCode;
    private javax.swing.JLabel lblDepCheckInputCode;
    private javax.swing.JLabel lblDepHeadCheck;
    private javax.swing.JLabel lblDepInsertCode;
    private javax.swing.JLabel lblDepLocalCheck;
    private javax.swing.JLabel lblDepNameCheck;
    private javax.swing.JLabel lblDepNoCheck;
    private javax.swing.JLabel lblDesCheckInputCode;
    private javax.swing.JLabel lblDesIdCheck;
    private javax.swing.JLabel lblDesInsertCode;
    private javax.swing.JLabel lblDesNameCheck;
    private javax.swing.JLabel lblEmpAddressCheck;
    private javax.swing.JLabel lblEmpCheckInputCode;
    private javax.swing.JLabel lblEmpDepNoCheck;
    private javax.swing.JLabel lblEmpDesIdCheck;
    private javax.swing.JLabel lblEmpEmailCheck;
    private javax.swing.JLabel lblEmpFaxCheck;
    private javax.swing.JLabel lblEmpIdCheck;
    private javax.swing.JLabel lblEmpInsertCode;
    private javax.swing.JLabel lblEmpNameCheck;
    private javax.swing.JLabel lblEmpPhoneCheck;
    private javax.swing.JLabel lblEmpSecIdCheck;
    private javax.swing.JLabel lblLoginCheckPassword;
    private javax.swing.JLabel lblLoginCheckUsername;
    private javax.swing.JLabel lblSecCheckInputCode;
    private javax.swing.JLabel lblSecDepNoCheck;
    private javax.swing.JLabel lblSecIdCheck;
    private javax.swing.JLabel lblSecInchCheck;
    private javax.swing.JLabel lblSecInsertCode;
    private javax.swing.JLabel lblSecNameCheck;
    private javax.swing.JLabel lblUser;
    private javax.swing.JLabel lblUser1;
    private javax.swing.JLabel lblUserAccLevelCheck;
    private javax.swing.JLabel lblUserCheckInputCode;
    private javax.swing.JLabel lblUserEmpIdCheck;
    private javax.swing.JLabel lblUserInsertCode;
    private javax.swing.JLabel lblUserPasswordCheck;
    private javax.swing.JLabel lblUserRePasswordCheck;
    private javax.swing.JLabel lblUsernameCheck;
    private javax.swing.JLabel lblVacCheckInputCode;
    private javax.swing.JLabel lblVacDateCheck;
    private javax.swing.JLabel lblVacDepNoCheck;
    private javax.swing.JLabel lblVacDesIdCheck;
    private javax.swing.JLabel lblVacFillCheckInputCode;
    private javax.swing.JLabel lblVacFillDateCheck;
    private javax.swing.JLabel lblVacFillEmpId;
    private javax.swing.JLabel lblVacFillIntakeCheck;
    private javax.swing.JLabel lblVacIdCheck;
    private javax.swing.JLabel lblVacInsertCode;
    private javax.swing.JLabel lblVacNoOfCheck;
    private javax.swing.JLabel lblVacPriorityCheck;
    private javax.swing.JLabel lblVacSecIdCheck;
    private javax.swing.JLabel lblVacStatusCheck;
    private javax.swing.JLabel lblWellcome;
    private javax.swing.JLabel lblWellcome1;
    private javax.swing.JList listOrgDep;
    private javax.swing.JMenuItem mniAbout;
    private javax.swing.JMenuItem mniDep;
    private javax.swing.JMenuItem mniDes;
    private javax.swing.JMenuItem mniEmp;
    private javax.swing.JMenuItem mniEmpHierachy;
    private javax.swing.JMenuItem mniExit;
    private javax.swing.JMenuItem mniJobRole;
    private javax.swing.JMenuItem mniOrg;
    private javax.swing.JMenuItem mniSec;
    private javax.swing.JMenuItem mniUser;
    private javax.swing.JMenuItem mniVac;
    private javax.swing.JMenuItem mniVacFill;
    private javax.swing.JMenuBar mnuBar;
    private javax.swing.JMenu mnuHelp;
    private javax.swing.JMenu mnuMaster;
    private javax.swing.JMenu mnuOrganization;
    private javax.swing.JPanel pnlAll;
    private javax.swing.JPanel pnlAll_Body;
    private javax.swing.JPanel pnlAll_Body_Main;
    private javax.swing.JPanel pnlAll_Body_Main_Bottom;
    private javax.swing.JPanel pnlAll_Body_Main_Head;
    private javax.swing.JPanel pnlAll_Head;
    private javax.swing.JPanel pnlAll_Head1;
    private javax.swing.JPanel pnlAll_Wellcome;
    private javax.swing.JPanel pnlAll_Wellcome1;
    private javax.swing.JPanel pnlConfirmVac;
    private javax.swing.JPanel pnlDepBody;
    private javax.swing.JPanel pnlDepHead;
    private javax.swing.JPanel pnlDepInfor;
    private javax.swing.JPanel pnlDepTable;
    private javax.swing.JPanel pnlDesBody;
    private javax.swing.JPanel pnlDesHead;
    private javax.swing.JPanel pnlDesInfor;
    private javax.swing.JPanel pnlDesTable;
    private javax.swing.JPanel pnlEmergency;
    private javax.swing.JPanel pnlEmpBody;
    private javax.swing.JPanel pnlEmpHead;
    private javax.swing.JPanel pnlEmpInfor;
    private javax.swing.JPanel pnlEmpTable;
    private javax.swing.JPanel pnlJobRotation_Bottom;
    private javax.swing.JPanel pnlJobRotation_Head;
    private javax.swing.JPanel pnlLogin;
    private javax.swing.JPanel pnlOrg;
    private javax.swing.JPanel pnlOrg_Hierachy;
    private javax.swing.JPanel pnlOrg_JobRotation;
    private javax.swing.JPanel pnlOrg_Main;
    private javax.swing.JPanel pnlOrg_VacFill;
    private javax.swing.JPanel pnlSecBody;
    private javax.swing.JPanel pnlSecHead;
    private javax.swing.JPanel pnlSecInfor;
    private javax.swing.JPanel pnlSecTable;
    private javax.swing.JPanel pnlUserBody;
    private javax.swing.JPanel pnlUserHead;
    private javax.swing.JPanel pnlUserInfor;
    private javax.swing.JPanel pnlUserTable;
    private javax.swing.JPanel pnlVacBody;
    private javax.swing.JPanel pnlVacFill_Bottom;
    private javax.swing.JPanel pnlVacFill_Head;
    private javax.swing.JPanel pnlVacHead;
    private javax.swing.JPanel pnlVacInfor;
    private javax.swing.JPanel pnlVacTable;
    private javax.swing.JPasswordField pwfLoginPassword;
    private javax.swing.JPasswordField pwfUserPass;
    private javax.swing.JPasswordField pwfUserRePass;
    private javax.swing.JRadioButton rdbConfirmVacFillDetails;
    private javax.swing.JRadioButton rdbEmergencyJobRotation;
    private javax.swing.JRadioButton rdbJobConfirmVacConfim;
    private javax.swing.JRadioButton rdbJobConfirmVacDeny;
    private javax.swing.JRadioButton rdbOrgEmp;
    private javax.swing.JRadioButton rdbOrgSec;
    private javax.swing.JRadioButton rdbOrgVac;
    private javax.swing.JScrollPane scpEmergencyRemark;
    private javax.swing.JScrollPane scpJobConfirmVacRemark;
    private javax.swing.JScrollPane scpOrgDepList;
    private javax.swing.JScrollPane scpOrgTable;
    private javax.swing.JScrollPane scpVacFillIntake;
    private javax.swing.JTable tblDep;
    private javax.swing.JTable tblDes;
    private javax.swing.JTable tblEmp;
    private javax.swing.JTable tblOrg;
    private javax.swing.JTable tblSec;
    private javax.swing.JTable tblUser;
    private javax.swing.JTable tblVac;
    private javax.swing.JTextArea txaEmergencyRemark;
    private javax.swing.JTextArea txaJobConfirmVacRemark;
    private javax.swing.JTextArea txaVacFillIntake;
    private javax.swing.JTextField txtDepHead;
    private javax.swing.JTextField txtDepInputCode;
    private javax.swing.JTextField txtDepLocation;
    private javax.swing.JTextField txtDepName;
    private javax.swing.JTextField txtDepNo;
    private javax.swing.JTextField txtDesId;
    private javax.swing.JTextField txtDesInputCode;
    private javax.swing.JTextField txtDesName;
    private javax.swing.JTextField txtEmerDes;
    private javax.swing.JTextField txtEmpAddress;
    private javax.swing.JTextField txtEmpEmail;
    private javax.swing.JTextField txtEmpFax;
    private javax.swing.JTextField txtEmpId;
    private javax.swing.JTextField txtEmpInputCode;
    private javax.swing.JTextField txtEmpName;
    private javax.swing.JTextField txtEmpPhone;
    private javax.swing.JTextField txtJobConfirmVacDep;
    private javax.swing.JTextField txtJobConfirmVacDes;
    private javax.swing.JTextField txtJobInputCode;
    private javax.swing.JTextField txtLoginUsername;
    private javax.swing.JTextField txtSecId;
    private javax.swing.JTextField txtSecInch;
    private javax.swing.JTextField txtSecInputCode;
    private javax.swing.JTextField txtSecName;
    private javax.swing.JTextField txtUserInputCode;
    private javax.swing.JTextField txtUsername;
    private javax.swing.JTextField txtVacDate;
    private javax.swing.JTextField txtVacFillDate;
    private javax.swing.JTextField txtVacFillInputCode;
    private javax.swing.JTextField txtVacId;
    private javax.swing.JTextField txtVacInputCode;
    private javax.swing.JTextField txtVacNoOf;
    private javax.swing.JTextField txtVacPriority;
    // End of variables declaration//GEN-END:variables
    DepartmentDAO depDAO;
    DesignationDAO desDAO;
    EmployeeDAO empDAO;
    VacancyDAO vacDAO;
    SectionDAO secDAO;
    UserDAO userDAO;
    VacancyFillDAO vacFillDAO;
    JobDAO jobDAO;
    OrgDAO orgDAO;
    String Username = "";
    String empId = "";
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    Date date = new Date(System.currentTimeMillis());
    String toDay = sdf.format(date);
    Boolean depConnect = false;
    Boolean empConnect = false;
    Boolean desConnect = false;
    Boolean vacConnect = false;
    Boolean secConnect = false;
    Boolean userConnect = false;
    Boolean vacFillConnect = false;
    Boolean jobConnect = false;
    Boolean orgConnect = false;
    Vector<String> loginData;

    public boolean validateDepInsert() {
        // Department Name
        if (txtDepName.getText().equals("")) {
            txtDepName.requestFocus();
            lblDepNameCheck.setVisible(true);
            lblDepNameCheck.setForeground(Color.red);
            lblDepNameCheck.setText("Cannot be null");
            return false;
        }
        lblDepNameCheck.setVisible(false);
        if (!txtDepName.getText().matches("[\\w]+(\\s\\w+)*$")) {
            txtDepName.requestFocus();
            lblDepNameCheck.setVisible(true);
            lblDepNameCheck.setForeground(Color.red);
            lblDepNameCheck.setText("This is not a Deparment's Name");
            return false;
        }
        lblDepNameCheck.setVisible(false);

        // Department Head
        if (txtDepHead.getText().equals("")) {
            txtDepHead.requestFocus();
            lblDepHeadCheck.setVisible(true);
            lblDepHeadCheck.setForeground(Color.red);
            lblDepHeadCheck.setText("Cannot be null");
            return false;
        }
        lblDepHeadCheck.setVisible(false);

        if (!txtDepHead.getText().matches("[\\w]+(\\s\\w+)*$")) {
            txtDepHead.requestFocus();
            lblDepHeadCheck.setVisible(true);
            lblDepHeadCheck.setForeground(Color.red);
            lblDepHeadCheck.setText("This is not a Head's Name");
            return false;
        }
        lblDepHeadCheck.setVisible(false);

        // Department Location
        if (txtDepLocation.getText().equals("")) {
            txtDepLocation.requestFocus();
            lblDepLocalCheck.setVisible(true);
            lblDepLocalCheck.setForeground(Color.red);
            lblDepLocalCheck.setText("Cannot be null");
            return false;
        }
        lblDepLocalCheck.setVisible(false);
        if (!txtDepLocation.getText().matches("^[\\w]+(\\s\\w+)*$")) {
            txtDepLocation.requestFocus();
            lblDepLocalCheck.setVisible(true);
            lblDepLocalCheck.setForeground(Color.red);
            lblDepLocalCheck.setText("This is not a Location");
            return false;
        }
        lblDepLocalCheck.setVisible(false);

        return true;
    }

    public boolean validateEmpInsert() {
        // Name
        if (txtEmpName.getText().equals("")) {
            txtEmpName.requestFocus();
            lblEmpNameCheck.setVisible(true);
            lblEmpNameCheck.setForeground(Color.red);
            lblEmpNameCheck.setText("Cannot be null");
            return false;
        }
        lblEmpNameCheck.setVisible(false);

        if (!txtEmpName.getText().matches("[\\w]+(\\s\\w+)*$")) {
            txtEmpName.requestFocus();
            lblEmpNameCheck.setVisible(true);
            lblEmpNameCheck.setForeground(Color.red);
            lblEmpNameCheck.setText("Name is not valid");
            return false;
        }
        lblEmpNameCheck.setVisible(false);

        // DepNo
        if (cbEmpDepNo.getSelectedIndex() == 0) {
            cbEmpDepNo.requestFocus();
            lblEmpDepNoCheck.setVisible(true);
            lblEmpDepNoCheck.setForeground(Color.red);
            lblEmpDepNoCheck.setText("Please select DepNo");
            return false;
        }
        lblEmpDepNoCheck.setVisible(false);

        // DesId
        if (cbEmpDesId.getSelectedIndex() == 0) {
            cbEmpDesId.requestFocus();
            lblEmpDesIdCheck.setVisible(true);
            lblEmpDesIdCheck.setForeground(Color.red);
            lblEmpDesIdCheck.setText("Please select DesId");
            return false;
        }
        lblEmpDesIdCheck.setVisible(false);

        // SecId
        if (cbEmpSecId.getSelectedIndex() == 0) {
            cbEmpSecId.requestFocus();
            lblEmpSecIdCheck.setVisible(true);
            lblEmpSecIdCheck.setForeground(Color.red);
            lblEmpSecIdCheck.setText("Please select DepNo");
            return false;
        }
        lblEmpSecIdCheck.setVisible(false);

        // Address
        // \d{1,5}\s\w.\s(\b\w*\b\s){1,2}\w*\.
        if (!txtEmpAddress.getText().matches("[\\w]+(\\s\\w+)*$")) {
            txtEmpAddress.requestFocus();
            lblEmpAddressCheck.setVisible(true);
            lblEmpAddressCheck.setForeground(Color.red);
            lblEmpAddressCheck.setText("Address is not valid");
            return false;
        }
        lblEmpAddressCheck.setVisible(false);

        // Phone
        if (!txtEmpPhone.getText().matches("[\\d]+")) {
            txtEmpPhone.requestFocus();
            lblEmpPhoneCheck.setVisible(true);
            lblEmpPhoneCheck.setForeground(Color.red);
            lblEmpPhoneCheck.setText("Phone is not valid");
            return false;
        }
        lblEmpPhoneCheck.setVisible(false);

        // Fax
        if (!txtEmpFax.getText().matches("[\\d]+")) {
            txtEmpFax.requestFocus();
            lblEmpFaxCheck.setVisible(true);
            lblEmpFaxCheck.setForeground(Color.red);
            lblEmpFaxCheck.setText("Fax is not valid");
            return false;
        }
        lblEmpFaxCheck.setVisible(false);

        // Email
        if (!txtEmpEmail.getText().matches("^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$")) {
            txtEmpEmail.requestFocus();
            lblEmpEmailCheck.setVisible(true);
            lblEmpEmailCheck.setForeground(Color.red);
            lblEmpEmailCheck.setText("Email is not true");
            return false;
        }
        lblEmpEmailCheck.setVisible(false);
        return true;
    }

    public boolean validateDesInsert() {
        // Name
        if (txtDesName.getText().equals("")) {
            txtDesName.requestFocus();
            lblDesNameCheck.setVisible(true);
            lblDesNameCheck.setForeground(Color.red);
            lblDesNameCheck.setText("Cannot be null");
            return false;
        }
        lblDesNameCheck.setVisible(false);

        if (txtDesName.getText().length() > 10) {
            txtDesName.requestFocus();
            lblDesNameCheck.setVisible(true);
            lblDesNameCheck.setForeground(Color.red);
            lblDesNameCheck.setText("Maximum is 10 characters");
            return false;
        }

        lblEmpEmailCheck.setVisible(false);
        return true;
    }

    public boolean validateVacInsert() {
        if (cbVacDepNo.getSelectedIndex() == 0) {
            cbVacDepNo.requestFocus();
            lblVacDepNoCheck.setVisible(true);
            lblVacDepNoCheck.setText("Please choice one DepNo");
            return false;
        }
        lblVacDepNoCheck.setVisible(false);

        if (cbVacSecId.getSelectedIndex() == 0) {
            cbVacSecId.requestFocus();
            lblVacSecIdCheck.setVisible(true);
            lblVacSecIdCheck.setText("Please choice onr Section ID");
            return false;
        }
        lblVacSecIdCheck.setVisible(false);

        if (cbVacDesId.getSelectedIndex() == 0) {
            cbVacDesId.requestFocus();
            lblVacDesIdCheck.setVisible(true);
            lblVacDesIdCheck.setText("Please choice one Designation ID");
            return false;
        }
        lblVacDesIdCheck.setVisible(false);

        if (txtVacNoOf.getText().equals("")) {
            txtVacNoOf.requestFocus();
            lblVacNoOfCheck.setVisible(true);
            lblVacNoOfCheck.setText("No Of Vacancy cannot be blank");
            return false;
        }
        lblVacNoOfCheck.setVisible(false);

        if (cbVacStatus.getSelectedIndex() == 0) {
            cbVacStatus.requestFocus();
            lblVacStatusCheck.setVisible(true);
            lblVacStatusCheck.setText("Please select Status");
            return false;
        }
        lblVacStatusCheck.setVisible(false);

        if (txtVacDate.getText().equals("")) {
            txtVacDate.requestFocus();
            lblVacDateCheck.setVisible(true);
            lblVacDateCheck.setText("Vacancy Date cannot be blank");
            return false;
        }
        lblVacDateCheck.setVisible(false);

        if (txtVacPriority.getText().equals("")) {
            txtVacPriority.requestFocus();
            lblVacPriorityCheck.setVisible(true);
            lblVacPriorityCheck.setText("Priority cannot be blank");
            return false;
        }
        lblVacPriorityCheck.setVisible(false);
        return true;
    }

    public boolean validateSecInsert() {
        // Name
        if (txtSecName.getText().equals("")) {
            txtSecName.requestFocus();
            lblSecNameCheck.setVisible(true);
            lblSecNameCheck.setForeground(Color.red);
            lblSecNameCheck.setText("Cannot be null");
            return false;
        }
        lblSecNameCheck.setVisible(false);

        if (!txtSecName.getText().matches("^[\\w]+(\\s[\\w]+)*$")) {
            txtSecName.requestFocus();
            lblSecNameCheck.setVisible(true);
            lblSecNameCheck.setForeground(Color.red);
            lblSecNameCheck.setText("Name is not valid (ex: 'a' or 'ab cd2-e')");
            return false;
        }
        lblSecNameCheck.setVisible(false);

        if (txtSecName.getText().trim().length() > 20) {
            txtSecName.requestFocus();
            lblSecNameCheck.setVisible(true);
            lblSecNameCheck.setForeground(Color.red);
            lblSecNameCheck.setText("Name is only 20 characters");
            return false;
        }
        lblSecNameCheck.setVisible(false);

        if (txtSecInch.getText().equals("")) {
            txtSecInch.requestFocus();
            lblSecInchCheck.setVisible(true);
            lblSecInchCheck.setForeground(Color.red);
            lblSecInchCheck.setText("Cannot be null");
            return false;
        }
        lblSecInchCheck.setVisible(false);

        if (!txtSecInch.getText().matches("^[\\w]+(\\s[\\w]+)*$")) {
            txtSecInch.requestFocus();
            lblSecInchCheck.setVisible(true);
            lblSecInchCheck.setForeground(Color.red);
            lblSecInchCheck.setText("Inch is not valid (ex: 'a' or 'ab cd2-e')");
            return false;
        }
        lblSecInchCheck.setVisible(false);

        if (txtSecInch.getText().trim().length() > 20) {
            txtSecInch.requestFocus();
            lblSecInchCheck.setVisible(true);
            lblSecInchCheck.setForeground(Color.red);
            lblSecInchCheck.setText("Inch is only 20 characters");
            return false;
        }
        lblSecInchCheck.setVisible(false);

        // DepNo
        if (cbSecDepNo.getSelectedIndex() == 0) {
            cbSecDepNo.requestFocus();
            lblSecDepNoCheck.setVisible(true);
            lblSecDepNoCheck.setForeground(Color.red);
            lblSecDepNoCheck.setText("Please select DepNo");
            return false;
        }
        lblSecDepNoCheck.setVisible(false);

        return true;
    }

    public boolean validateUserInsert() {
        String password = new String(pwfUserPass.getPassword());
        String rePassword = new String(pwfUserRePass.getPassword());

        if (password.length() > 10 || password.length() < 3) {
            pwfUserPass.requestFocus();
            lblUserPasswordCheck.setVisible(true);
            lblUserPasswordCheck.setForeground(Color.red);
            lblUserPasswordCheck.setText("Password must between 3 - 10 characters");
            return false;
        }
        lblUserPasswordCheck.setVisible(false);

        if (!rePassword.equals(password)) {
            pwfUserRePass.requestFocus();
            lblUserRePasswordCheck.setVisible(true);
            lblUserRePasswordCheck.setForeground(Color.red);
            lblUserRePasswordCheck.setText("Repassword must match with Password");
            return false;
        }
        lblUserRePasswordCheck.setVisible(false);

        if (cbUserEmpId.getSelectedIndex() == 0) {
            cbUserEmpId.requestFocus();
            lblUserEmpIdCheck.setVisible(true);
            lblUserEmpIdCheck.setForeground(Color.red);
            lblUserEmpIdCheck.setText("Select Employee ID");
            return false;
        }
        lblUserEmpIdCheck.setVisible(false);

        if (cbUserAccLevel.getSelectedIndex() == 0) {
            cbUserAccLevel.requestFocus();
            lblUserAccLevelCheck.setVisible(true);
            lblUserAccLevelCheck.setForeground(Color.red);
            lblUserAccLevelCheck.setText("Select Account level");
            return false;
        }
        lblUserAccLevelCheck.setVisible(false);

        return true;
    }

    public boolean validateVacFillInsert() {
        if (txtVacFillDate.getText().equals("")) {
            lblVacFillDateCheck.setVisible(true);
            lblVacFillDateCheck.setText("Cannot be null");
            return false;
        }
        lblVacFillDateCheck.setVisible(false);

        if (!isValidDate(txtVacFillDate.getText())) {
            lblVacFillDateCheck.setVisible(true);
            lblVacFillDateCheck.setText("Date is not valid (ex: yyyy-MM-dd)");
            return false;
        }
        lblVacFillDateCheck.setVisible(false);

        if (txaVacFillIntake.getText().equals("")) {
            lblVacFillIntakeCheck.setVisible(true);
            lblVacFillIntakeCheck.setText("Cannot be null");
            return false;
        }
        lblVacFillIntakeCheck.setVisible(false);

        return true;
    }

    public void showLogin() {
        pnlLogin.setVisible(true);
        setFocusColorComponent(pnlLogin);
        lblLoginCheckPassword.setVisible(false);
        lblLoginCheckUsername.setVisible(false);
        hideMenuMaster();
        pnlOrg.setVisible(false);
        pnlAll.setVisible(false);

        mnuBar.setVisible(false);
    }

    public void showAll() {
        pnlLogin.setVisible(false);
        pnlOrg.setVisible(false);
        pnlAll.setVisible(true);
        showMenuMaster();
        hideLabelCheck();

        mnuBar.setVisible(true);
    }

    public void showOrg() {
        pnlLogin.setVisible(false);
        pnlOrg.setVisible(true);
        pnlAll.setVisible(false);

        showMenuMaster();
        mnuBar.setVisible(true);
    }

    public void hideAll() {
        // hide Head-Main
        pnlDepHead.setVisible(false);
        pnlEmpHead.setVisible(false);
        pnlDesHead.setVisible(false);
        pnlVacHead.setVisible(false);
        pnlSecHead.setVisible(false);
        pnlUserHead.setVisible(false);
        pnlAll_Body_Main_Head.setVisible(false);

        // hide Bottom-Main
        pnlDepInfor.setVisible(false);
        pnlDepTable.setVisible(false);
        pnlDepBody.setVisible(false);

        pnlEmpInfor.setVisible(false);
        pnlEmpTable.setVisible(false);
        pnlEmpBody.setVisible(false);

        pnlDesInfor.setVisible(false);
        pnlDesTable.setVisible(false);
        pnlDesBody.setVisible(false);

        pnlVacInfor.setVisible(false);
        pnlVacTable.setVisible(false);
        pnlVacBody.setVisible(false);

        pnlSecInfor.setVisible(false);
        pnlSecTable.setVisible(false);
        pnlSecBody.setVisible(false);

        pnlUserInfor.setVisible(false);
        pnlUserTable.setVisible(false);
        pnlUserBody.setVisible(false);

        pnlAll_Body_Main_Bottom.setVisible(false);
    }

    public void showChoice(JPanel pnlInput, JPanel pnlBody, JPanel pnlChoice) {
        hideAll();
        // show head
        pnlAll_Body_Main_Head.setVisible(true);
        pnlInput.setVisible(true);
        pnlInput.requestFocus();

        // show main
        pnlAll_Body_Main_Bottom.setVisible(true);
        pnlBody.setVisible(true);
        pnlChoice.setVisible(true);
    }

    public void disablePanelInfo(JPanel pnl, JPanel pnlHead) {
        setFocusColorComponent(pnlHead);
        for (int i = 0; i < pnl.getComponentCount(); i++) {
            pnl.getComponent(i).setEnabled(false);
        }

        for (int i = 0; i < pnlHead.getComponentCount(); i++) {
            pnlHead.getComponent(i).setEnabled(true);
        }
    }

    public void enablePanelInfor(JPanel pnl, JPanel pnlHead) {
        setFocusColorComponent(pnl);
        for (int i = 0; i < pnl.getComponentCount(); i++) {
            pnl.getComponent(i).setEnabled(true);
        }

        for (int i = 0; i < pnlHead.getComponentCount(); i++) {
            pnlHead.getComponent(i).setEnabled(false);
        }
    }

    public void changeStatusIsInsert(Boolean isInsert, JButton btnStart, JButton btnInsert, JButton btnReset) {
        if (isInsert) {
            btnStart.setText("INSERT");
            btnInsert.setText("INSERT");
            btnReset.setText("RESET");
            btnStart.setIcon(new ImageIcon(getClass().getResource("/Img/plus-32.png")));
            return;
        }

        btnStart.setText("UPDATE");
        btnInsert.setText("UPDATE");
        btnReset.setText("DELETE");
        btnStart.setIcon(new ImageIcon(getClass().getResource("/Img/settings-32.png")));
    }

    public void checkDepInputCode(String code, JLabel lbl, JButton btn, JLabel lblCheck) {
        if (code.equals("")) {
            lbl.setText("INPUT CODE");
            lblCheck.setText("Can not be null");
            resetAllTextField();
            btn.setEnabled(false);
            return;
        }

        if (!code.matches("[0-9]+")) {
            lbl.setText("INVALID CODE");
            lblCheck.setText("Must be a number");
            resetAllTextField();
            btn.setEnabled(false);
            return;
        }

        txtDepInputCode.setText("" + Integer.parseInt(code));

        if (depDAO.checkDepNo(Integer.parseInt(code)).equals("Not exist")) {
            lbl.setText("NEW CODE");
            lblCheck.setText("Click Insert to add new Department");
            changeStatusIsInsert(true, btnDepStart, btnDepInsert, btnDepReset);
            btn.setEnabled(true);
            resetAllTextField();
            return;
        }

        lblCheck.setText("Click Update to edit Department");
        lbl.setText("UPDATE");
        btn.setEnabled(true);
        changeStatusIsInsert(false, btnDepStart, btnDepInsert, btnDepReset);
        loadDepToUpdate(Integer.parseInt(code));
    }

    public void checkDesInputCode(String code, JLabel lbl, JButton btn, JLabel lblCheck) {
        if (code.equals("")) {
            lbl.setText("INPUT CODE");
            lblCheck.setText("Can not be null");
            resetAllTextField();
            btn.setEnabled(false);
            return;
        }

        if (!code.matches("^[D][0-9]+$")) {
            lbl.setText("INVALID CODE");
            lblCheck.setText("Code must start with 'D' and number follow");
            resetAllTextField();
            btn.setEnabled(false);
            return;
        }

        if (desDAO.checkDesId(code).equals("Not exist")) {
            lbl.setText("NEW CODE");
            lblCheck.setText("Click Insert to add new Designation");

            btn.setEnabled(true);
            changeStatusIsInsert(true, btnDesStart, btnDesInsert, btnDesReset);
            resetAllTextField();
            return;
        }

        lbl.setText("UPDATE");
        lblCheck.setText("Click Update to edit Designation");
        btn.setEnabled(true);
        changeStatusIsInsert(false, btnDesStart, btnDesInsert, btnDesReset);
        loadDesToUpdate(code);
    }

    public void checkEmpInputCode(String code, JLabel lbl, JButton btn, JLabel lblCheck) {
        if (code.equals("")) {
            lbl.setText("INPUT CODE");
            lblCheck.setText("Can not be null");
            resetAllTextField();
            btn.setEnabled(false);
            return;
        }

        if (!code.matches("^[E][0-9]+$")) {
            lbl.setText("INVALID CODE");
            lblCheck.setText("Code must start with 'E' and number follow");
            resetAllTextField();
            btn.setEnabled(false);
            return;
        }

        if (!empDAO.checkEmpId(code).equals("Exist")) {
            lbl.setText("NEW CODE");
            lblCheck.setText("Click Insert to add new Employee");
            btn.setEnabled(true);
            changeStatusIsInsert(true, btnEmpStart, btnEmpInsert, btnEmpReset);
            resetAllTextField();
            return;
        }

        lbl.setText("UPDATE");
        lblCheck.setText("Click Update to edit Employee");
        btn.setEnabled(true);
        changeStatusIsInsert(false, btnEmpStart, btnEmpInsert, btnEmpReset);
        loadEmpToUpdate(code);
    }

    public void checkVacInputCode(String code, JLabel lbl, JButton btn, JLabel lblCheck) {
        if (code.equals("")) {
            lbl.setText("INPUT CODE");
            lblCheck.setText("Can not be null");
            resetAllTextField();
            btn.setEnabled(false);
            return;
        }

        if (!code.matches("^[V][0-9]+$")) {
            lblCheck.setText("Code must start with 'V' and number follow");
            lbl.setText("INVALID CODE");
            resetAllTextField();
            btn.setEnabled(false);
            return;
        }

        if (!vacDAO.checkVacID(code).equals("Exist")) {
            lbl.setText("NEW CODE");
            lblCheck.setText("Click Insert to add new Vacancy");
            btn.setEnabled(true);
            changeStatusIsInsert(true, btnVacStart, btnVacInsert, btnVacReset);
            resetAllTextField();
            return;
        }

        lbl.setText("UPDATE");
        lblCheck.setText("Click Update to edit Vacancy");
        btn.setEnabled(true);
        changeStatusIsInsert(false, btnVacStart, btnVacInsert, btnVacReset);
        loadVacToUpdate(code);
    }

    public void checkSecInputCode(String code, JLabel lbl, JButton btn, JLabel lblCheck) {
        if (code.equals("")) {
            lbl.setText("INPUT CODE");
            lblCheck.setText("Can not be null");
            resetAllTextField();
            btn.setEnabled(false);
            return;
        }

        if (!code.matches("^[S][0-9]+$")) {
            lblCheck.setText("Code must start with 'S' and number follow");
            lbl.setText("INVALID CODE");
            resetAllTextField();
            btn.setEnabled(false);
            return;
        }

        if (!secDAO.checkSecId(code).equals("Exist")) {
            lbl.setText("NEW CODE");
            lblCheck.setText("Click Insert to add new Section");
            btn.setEnabled(true);
            changeStatusIsInsert(true, btnSecStart, btnSecInsert, btnSecReset);
            resetAllTextField();
            return;
        }

        lbl.setText("UPDATE");
        lblCheck.setText("Click Update to edit Section");
        btn.setEnabled(true);
        changeStatusIsInsert(false, btnSecStart, btnSecInsert, btnSecReset);
        loadSecToUpdate(code);
    }

    public void checkUserInputCode(String username, JLabel lbl, JButton btn, JLabel lblCheck) {
        if (username.equals("")) {
            lbl.setText("INPUT CODE");
            lblCheck.setText("Can not be null");
            resetAllTextField();
            btn.setEnabled(false);
            return;
        }

        if (!username.matches("\\w{3,10}")) {
            lbl.setText("INVALID CODE");
            lblCheck.setText("Must be characters (3 - 10 character)");
            resetAllTextField();
            btn.setEnabled(false);
            return;
        }

        if (!userDAO.checkUsername(username).equals("Exist")) {
            lbl.setText("NEW CODE");
            lblCheck.setText("Click Insert to add new User account");
            btn.setEnabled(true);
            changeStatusIsInsert(true, btnUserStart, btnUserInsert, btnUserReset);
            resetAllTextField();
            return;
        }

        lbl.setText("UPDATE");
        lblCheck.setText("Click Update to edit User account");
        btn.setEnabled(true);
        changeStatusIsInsert(false, btnUserStart, btnUserInsert, btnUserReset);
        loadUserToUpdate(username);
    }

    public void hideLabelCheck() {
        lblDepNoCheck.setVisible(false);
        lblDepNameCheck.setVisible(false);
        lblDepHeadCheck.setVisible(false);
        lblDepLocalCheck.setVisible(false);

        lblEmpIdCheck.setVisible(false);
        lblEmpNameCheck.setVisible(false);
        lblEmpDepNoCheck.setVisible(false);
        lblEmpDesIdCheck.setVisible(false);
        lblEmpSecIdCheck.setVisible(false);
        lblEmpAddressCheck.setVisible(false);
        lblEmpPhoneCheck.setVisible(false);
        lblEmpFaxCheck.setVisible(false);
        lblEmpEmailCheck.setVisible(false);

        lblDesIdCheck.setVisible(false);
        lblDesNameCheck.setVisible(false);

        lblVacIdCheck.setVisible(false);
        lblVacDepNoCheck.setVisible(false);
        lblVacDesIdCheck.setVisible(false);
        lblVacSecIdCheck.setVisible(false);
        lblVacNoOfCheck.setVisible(false);
        lblVacStatusCheck.setVisible(false);
        lblVacDateCheck.setVisible(false);
        lblVacPriorityCheck.setVisible(false);

        lblSecIdCheck.setVisible(false);
        lblSecDepNoCheck.setVisible(false);
        lblSecNameCheck.setVisible(false);
        lblSecInchCheck.setVisible(false);

        lblUsernameCheck.setVisible(false);
        lblUserPasswordCheck.setVisible(false);
        lblUserRePasswordCheck.setVisible(false);
        lblUserEmpIdCheck.setVisible(false);
        lblUserAccLevelCheck.setVisible(false);
    }

    public void loadDepToUpdate(int DepNo) {
        Vector depData = depDAO.loadDepToUpdate(DepNo);
        txtDepNo.setText(depData.get(0).toString());

        txtDepName.setText(depData.get(1).toString());
        txtDepHead.setText(depData.get(2).toString());
        txtDepLocation.setText(depData.get(3).toString());
    }

    public void loadDesToUpdate(String DesId) {
        Vector<String> desData = desDAO.loadDesToUpdate(DesId);
        txtDesId.setText(desData.get(0).toString());
        txtDesName.setText(desData.get(1).toString());
    }

    public void loadEmpToUpdate(String EmpId) {
        Vector vecEmpData = empDAO.loadEmpToUpdate(EmpId);

        txtEmpId.setText(vecEmpData.get(0).toString());
        txtEmpName.setText(vecEmpData.get(1).toString());
        txtEmpAddress.setText(vecEmpData.get(5).toString());
        txtEmpPhone.setText(vecEmpData.get(6).toString());
        txtEmpFax.setText(vecEmpData.get(7).toString());
        txtEmpEmail.setText(vecEmpData.get(8).toString());
        cbEmpDepNo.setSelectedItem(vecEmpData.get(2));
        cbEmpDesId.setSelectedItem(vecEmpData.get(3));
        cbEmpSecId.setSelectedItem(vecEmpData.get(4));

    }

    public void loadVacToUpdate(String VacId) {
        Vector vecVacData = vacDAO.loadVacToUpdate(txtVacInputCode.getText().trim());

        txtVacId.setText(vecVacData.get(0).toString());
        cbVacDepNo.setSelectedItem(vecVacData.get(1).toString());
        cbVacSecId.setSelectedItem(vecVacData.get(2).toString());
        cbVacDesId.setSelectedItem(vecVacData.get(3).toString());
        txtVacNoOf.setText(vecVacData.get(4).toString());
        cbVacStatus.setSelectedItem(vecVacData.get(5).toString());
        txtVacDate.setText(vecVacData.get(6).toString());
        txtVacPriority.setText(vecVacData.get(7).toString());
    }

    public void loadSecToUpdate(String SecId) {
        Vector vecSecData = secDAO.loadSecToUpdate(SecId);

        txtSecId.setText(vecSecData.get(0).toString());
        txtSecName.setText(vecSecData.get(1).toString());
        txtSecInch.setText(vecSecData.get(2).toString());
        cbSecDepNo.setSelectedItem(vecSecData.get(3));

    }

    public void loadUserToUpdate(String Username) {
        Vector userData = userDAO.loadUserToUpdate(Username);
        txtUsername.setText(userData.get(0).toString());
        pwfUserPass.setText(userData.get(1).toString());
        pwfUserRePass.setText(userData.get(1).toString());
        cbUserAccLevel.setSelectedItem(userData.get(2));
        cbUserEmpId.setSelectedItem(userData.get(3).toString());
    }

    public void resetAllTextField() {
        txtDepName.setText("");
        txtDepHead.setText("");
        txtDepLocation.setText("");

        txtEmpName.setText("");
        txtEmpAddress.setText("");
        txtEmpPhone.setText("");
        txtEmpFax.setText("");
        txtEmpEmail.setText("");
        cbEmpDepNo.setSelectedIndex(0);
        cbEmpDesId.setSelectedIndex(0);
        cbEmpSecId.setSelectedIndex(0);

        txtDesName.setText("");

        txtVacNoOf.setText("1");
        cbVacStatus.setSelectedIndex(2);
        txtVacDate.setText("" + toDay);
        txtVacPriority.setText("Normal");
        cbVacDepNo.setSelectedIndex(0);
        cbVacDesId.setSelectedIndex(0);
        cbVacSecId.setSelectedIndex(0);

        txtSecName.setText("");
        txtSecInch.setText("");
        cbSecDepNo.setSelectedIndex(0);

        pwfUserPass.setText("");
        pwfUserRePass.setText("");
        cbUserEmpId.setSelectedIndex(0);
        cbUserAccLevel.setSelectedIndex(0);
    }

    public void loadPanelWellcome() {
        String name = loginData.get(1).toString();
        String accLevel = loginData.get(4).toString();

        lblUser.setText(name);
        lblUser1.setText(name);

        if (accLevel.equals("U")) {
            lblAcclevel.setText("Access-level: Normal User");
            lblAcclevel1.setText("Access-level: Normal User");
            return;
        }

        lblAcclevel.setText("Access-level: Administrator");
        lblAcclevel1.setText("Access-level: Administrator");
    }

    public void hideMenuMaster() {
        mniDep.setEnabled(false);
        mniEmp.setEnabled(false);
        mniDes.setEnabled(false);
        mniSec.setEnabled(false);
        mniVac.setEnabled(false);
        mniUser.setEnabled(false);
    }

    public void showMenuMaster() {
        mniDep.setEnabled(true);
        mniEmp.setEnabled(true);
        mniDes.setEnabled(true);
        mniSec.setEnabled(true);
        mniVac.setEnabled(true);
        mniUser.setEnabled(true);
    }

    public void showMasterOrg(JPanel pnlHead, JPanel pnlBottom) {
        pnlOrg_Main.setVisible(true);
        pnlOrg_VacFill.setVisible(false);
        pnlOrg_JobRotation.setVisible(false);
        pnlOrg_Hierachy.setVisible(false);

        pnlHead.setVisible(true);
        disablePaneInfor(pnlBottom);

        hideOrgLableCheck();
        txtVacFillInputCode.setText("");

        setFocusColorComponent(pnlVacFill_Head);
        setFocusColorComponent(pnlJobRotation_Head);
    }

    public void disablePaneInfor(JPanel pnl) {
        for (int i = 0; i < pnl.getComponentCount(); i++) {
            pnl.getComponent(i).setEnabled(false);
        }
        scpVacFillIntake.setEnabled(false);
        txaVacFillIntake.setEnabled(false);
    }

    public void enablePanelInfor(JPanel pnl) {
        setFocusColorComponent(pnl);
        for (int i = 0; i < pnl.getComponentCount(); i++) {
            pnl.getComponent(i).setEnabled(true);
        }
        scpVacFillIntake.setEnabled(true);
        txaVacFillIntake.setEnabled(true);
    }

    public void hideOrgLableCheck() {
        lblVacFillDateCheck.setVisible(false);
        lblVacFillIntakeCheck.setVisible(false);
    }

    public void checkVacFillInputCode(String code, JLabel lbl, JButton btn) {
        if (code.equals("")) {
            lbl.setBackground(Color.blue);
            lbl.setForeground(Color.white);
            lbl.setText("INPUT CODE");
            resetOrgTextField();
            btn.setEnabled(false);
            return;
        }

//        if (!code.matches("^[V][0-9]{1,5}$")) {
//            lbl.setBackground(Color.red);
//            lbl.setForeground(Color.white);
//            lbl.setText("INVALID CODE");
//            resetOrgTextField();
//            btn.setEnabled(false);
//            return;
//        }
        String vacFillStatus = vacFillDAO.checkVacFillStatus(code, empId);
        if (vacFillStatus.equals("New code")) {
            lbl.setBackground(Color.blue);
            lbl.setForeground(Color.white);
            lbl.setText("NEW CODE");
            resetOrgTextField();
            btn.setEnabled(true);
            changeStatusVacFillBtn(true, btnVacFillInsert, btnVacFillReset);
            return;
        }

        if (vacFillStatus.equals("Confirmed")) {
            lbl.setBackground(Color.red);
            lbl.setForeground(Color.white);
            lbl.setText("ADMIN confimed");
            resetOrgTextField();
            btn.setEnabled(false);
            changeStatusVacFillBtn(false, btnVacFillInsert, btnVacFillReset);
            loadVacFillToUpdate(code, lblVacFillEmpId.getText().trim());
            return;
        }

        if (vacFillStatus.equals("Deny")) {
            lbl.setBackground(Color.red);
            lbl.setForeground(Color.white);
            lbl.setText("ADMIN deny");
            resetOrgTextField();
            btn.setEnabled(false);
            changeStatusVacFillBtn(false, btnVacFillInsert, btnVacFillReset);
            loadVacFillToUpdate(code, lblVacFillEmpId.getText().trim());
            return;
        }

        if (vacFillStatus.equals("Not confirmed")) {
            lbl.setBackground(Color.yellow);
            lbl.setForeground(Color.black);
            lbl.setText("UPDATE");
            btn.setEnabled(true);
            changeStatusVacFillBtn(false, btnVacFillInsert, btnVacFillReset);
            loadVacFillToUpdate(code, lblVacFillEmpId.getText().trim());
            return;
        }

    }

    public void loadVacFillToUpdate(String vacID, String empId) {
        Vector v = vacFillDAO.loadVacFillToUpdate(vacID, empId);
        txtVacFillDate.setText(v.get(0).toString());
        txaVacFillIntake.setText(v.get(1).toString());
    }

    public void resetOrgTextField() {
        txaVacFillIntake.setText("");
    }

    public void checkVacId() {
        lblVacFillEmpId.setText(empId);
        String vacId = vacFillDAO.isHaveVacNoConfirm(empId);

        // If not have any Vac Fill ID with no Confirm
        if (!vacId.equals("")) {
            // Text Field Vac ID
            txtVacFillInputCode.setText(vacId);
            txtVacFillInputCode.setEditable(false);

            // Button ...
            btnVacFillViewTableVac.setEnabled(false);

            // Label check input code
            lblVacFillCheckInputCode.setText("UPDATE");

            // Butotn Start input
            btnVacFillStart.setEnabled(true);

            // load data to update
            loadVacFillToUpdate(vacId, empId);

        } else {
            // Text Field Vac ID
            txtVacFillInputCode.setText("");
            txtVacFillInputCode.setEditable(true);

            // Button ...
            btnVacFillViewTableVac.setEnabled(true);

            // Label check input code
            lblVacFillCheckInputCode.setText("INPUT CODE");

            // Butotn Start input
            btnVacFillStart.setEnabled(false);

            // load data to update
            resetOrgTextField();
        }
    }

    public void changeStatusVacFillBtn(Boolean isInsert, JButton btnInsert, JButton btnReset) {
        if (isInsert) {
            btnInsert.setText("INSERT");
            btnReset.setText("RESET");
            return;
        }

        btnInsert.setText("UPDATE");
        btnReset.setText("DELETE");
    }

    boolean isValidDate(String date) {
        try {
            return true;
        } catch (Exception e) {
            return false;
        }
    }

    public static PlainDocument getPlainDocument(final int maxLength) {
        PlainDocument p = new PlainDocument() {
            @Override
            public void insertString(int arg0, String arg1, AttributeSet arg2) {
                // TODO Auto-generated method stub
                if (getLength() + arg1.length() <= maxLength) {
                    try {
                        super.insertString(arg0, arg1, arg2);
                    } catch (Exception ex) {
                        ex.printStackTrace();
                    }
                }
            }
        };
        return p;
    }

    public void setMaxLengthTextField() {
        // Main-Head Master
        txtDepInputCode.setDocument(getPlainDocument(5));
        txtEmpInputCode.setDocument(getPlainDocument(5));
        txtDesInputCode.setDocument(getPlainDocument(5));
        txtSecInputCode.setDocument(getPlainDocument(5));
        txtVacInputCode.setDocument(getPlainDocument(5));
        txtUserInputCode.setDocument(getPlainDocument(10));

        // Main-Bottom
        // Department
        txtDepNo.setDocument(getPlainDocument(5));
        txtDepName.setDocument(getPlainDocument(20));
        txtDepHead.setDocument(getPlainDocument(20));
        txtDepLocation.setDocument(getPlainDocument(20));

        // Employee
        txtEmpId.setDocument(getPlainDocument(10));
        txtEmpName.setDocument(getPlainDocument(20));
        txtEmpAddress.setDocument(getPlainDocument(50));
        txtEmpPhone.setDocument(getPlainDocument(15));
        txtEmpFax.setDocument(getPlainDocument(15));
        txtEmpEmail.setDocument(getPlainDocument(50));

        // Designation
        txtDesName.setDocument(getPlainDocument(20));

        // Vacancy
        txtVacNoOf.setDocument(getPlainDocument(4));
        //txtVacStatus.setDocument(getPlainDocument(1));
        //txtVacDate.setDocument(getPlainDocument(9));
        txtVacPriority.setDocument(getPlainDocument(20));

        // Section
        txtSecName.setDocument(getPlainDocument(20));
        txtSecInch.setDocument(getPlainDocument(20));

        // Username
        pwfUserPass.setDocument(getPlainDocument(10));
        pwfUserRePass.setDocument(getPlainDocument(10));

        // Vacancy Fill Details
        txtVacFillInputCode.setDocument(getPlainDocument(5));
        //txtVacFillDate.setDocument(getPlainDocument(9));
        txaVacFillIntake.setDocument(getPlainDocument(50));

        // Vacancy Date textField
        txtVacDate.setEditable(false);
        txtVacFillDate.setEditable(false);
    }

    public void closeAllConnect() {
        if (depConnect) {
            depDAO.closeConnect();
        }

        if (empConnect) {
            empDAO.closeConnect();
        }

        if (depConnect) {
            depDAO.closeConnect();
        }

        if (secConnect) {
            secDAO.closeConnect();
        }

        if (vacConnect) {
            vacDAO.closeConnect();
        }

        if (userConnect) {
            userDAO.closeConnect();
        }

        if (vacFillConnect) {
            vacFillDAO.closeConnect();
        }

        if (jobConnect) {
            jobDAO.closeConnect();
        }

        depConnect = false;
        empConnect = false;
        desConnect = false;
        secConnect = false;
        vacConnect = false;
        userConnect = false;
        jobConnect = false;
        vacFillConnect = false;
    }

    public void loadTableOrg(int depNo, String select) {
        DefaultTableModel dtm;
        switch (select) {
            case "emp":
                dtm = orgDAO.loadListEmp(depNo);
                break;
            case "sec":
                dtm = orgDAO.loadListSec(depNo);
                break;
            default:
                dtm = orgDAO.loadListVac(depNo);
                break;
        }

        tblOrg.setModel(dtm);
    }

    public void signOut() {
        showLogin();
        closeAllConnect();
        txtLoginUsername.setText("");
        pwfLoginPassword.setText("");
    }

    public void login() {
        String username = txtLoginUsername.getText().trim();
        String password = new String(pwfLoginPassword.getPassword());

        if (username.equals("")) {
            lblLoginCheckUsername.setVisible(true);
            lblLoginCheckUsername.setText("Username cannot be null");
            txtLoginUsername.requestFocus();
            return;
        }
        lblLoginCheckUsername.setVisible(false);

        if (password.equals("")) {
            lblLoginCheckPassword.setVisible(true);
            lblLoginCheckPassword.setText("Password cannot be null");
            pwfLoginPassword.requestFocus();
            return;
        }
        lblLoginCheckPassword.setVisible(false);

        AccountDAO accDAO = new AccountDAO();

        loginData = accDAO.loadDataUser(username, password);
        if (loginData.size() < 1) {
            JOptionPane.showMessageDialog(this, "Username or Password is not valid! Please try again", "LOGIN", JOptionPane.ERROR_MESSAGE);
            return;
        }

        empId = loginData.get(0);

        pnlLogin.setVisible(false);
        loadPanelWellcome();
        showAll();

        depDAO = new DepartmentDAO();
        depConnect = true;

        showChoice(pnlDepHead, pnlDepBody, pnlDepInfor);
        disablePanelInfo(pnlDepInfor, pnlDepHead);
        checkDepInputCode(txtDepInputCode.getText().trim(), lblDepInsertCode, btnDepStart, lblDepCheckInputCode);

        txtDepInputCode.requestFocus();
    }

    public void setFocusColorComponent(JPanel pnl) {
        Component[] comp = pnl.getComponents();
        for (Component c : comp) {
            if (c instanceof JTextField) {
                final JTextField txt = (JTextField) c;
                txt.addFocusListener(new FocusListener() {
                    @Override
                    public void focusGained(FocusEvent e) {
                        txt.setBackground(Color.GREEN);
                        txt.selectAll();
                    }

                    @Override
                    public void focusLost(FocusEvent e) {
                        txt.setBackground(Color.white);
                    }
                });
            }

            if (c instanceof JComboBox) {
                final JComboBox cb = (JComboBox) c;
                cb.addFocusListener(new FocusListener() {
                    @Override
                    public void focusGained(FocusEvent e) {
                        cb.setBackground(Color.GREEN);
                    }

                    @Override
                    public void focusLost(FocusEvent e) {
                        cb.setBackground(Color.white);
                    }
                });
            }

//            if (c instanceof JScrollPane) {
//                final JTextArea txa = (JTextArea) c;
//                txa.addFocusListener(new FocusListener() {
//
//                    @Override
//                    public void focusGained(FocusEvent e) {
//                        txa.setBackground(Color.GREEN);
//                    }
//
//                    @Override
//                    public void focusLost(FocusEvent e) {
//                        txa.setBackground(Color.white);
//                    }
//                });
//            }
        }
    }

    public void checkRadioBtnJobRoation() {
        pnlConfirmVac.setVisible(false);
        pnlEmergency.setVisible(false);
        pnlJobRotation_Bottom.setVisible(true);

        if (rdbConfirmVacFillDetails.isSelected()) {
            pnlConfirmVac.setVisible(true);
            disablePanelConfirmVac();
            lblCheckJobConfirmVac.setEnabled(true);
            lblCheckJobConfirmVac.setForeground(Color.white);
            txtJobInputCode.setText("");
            checkConfirmVacInputCode();
        } else {
            pnlEmergency.setVisible(true);
            disablePanelEmergency();
            lblCheckEmerDep.setEnabled(true);
            lblCheckEmerDep.setForeground(Color.white);
            lblCheckEmerSec.setEnabled(true);
            lblCheckEmerSec.setForeground(Color.white);
            txtJobInputCode.setText("");
            checkEmergencyInputCode();
        }
        txtJobInputCode.requestFocus();
        btnJobStart.setEnabled(false);
    }

    public void disablePanelConfirmVac() {
        for (int i = 0; i < pnlConfirmVac.getComponentCount(); i++) {
            pnlConfirmVac.getComponent(i).setEnabled(false);
            txaJobConfirmVacRemark.setEnabled(false);
        }

        for (int i = 0; i < pnlJobRotation_Head.getComponentCount(); i++) {
            pnlJobRotation_Head.getComponent(i).setEnabled(true);
        }

        txtJobInputCode.requestFocus();
        lblCheckJobConfirmVac.setEnabled(true);
    }

    public void enablePanelConfirmVac() {
        for (int i = 0; i < pnlConfirmVac.getComponentCount(); i++) {
            pnlConfirmVac.getComponent(i).setEnabled(true);
            txaJobConfirmVacRemark.setEnabled(true);
        }

        for (int i = 0; i < pnlJobRotation_Head.getComponentCount(); i++) {
            pnlJobRotation_Head.getComponent(i).setEnabled(false);
        }

        setFocusColorComponent(pnlConfirmVac);
    }

    public void disablePanelEmergency() {
        for (int i = 0; i < pnlEmergency.getComponentCount(); i++) {
            pnlEmergency.getComponent(i).setEnabled(false);
            txaEmergencyRemark.setEnabled(false);
            lblCheckEmerDep.setEnabled(true);
            lblCheckEmerSec.setEnabled(true);
        }

        for (int i = 0; i < pnlJobRotation_Head.getComponentCount(); i++) {
            pnlJobRotation_Head.getComponent(i).setEnabled(true);
        }

        txtJobInputCode.requestFocus();
    }

    public void enablePanelpnlEmergency() {
        for (int i = 0; i < pnlEmergency.getComponentCount(); i++) {
            pnlEmergency.getComponent(i).setEnabled(true);
            txaEmergencyRemark.setEnabled(true);
        }

        for (int i = 0; i < pnlJobRotation_Head.getComponentCount(); i++) {
            pnlJobRotation_Head.getComponent(i).setEnabled(false);
        }

        setFocusColorComponent(pnlEmergency);
    }

    public void ConfirmVacStart() {
        enablePanelConfirmVac();
    }

    public void EmergencyStart() {
        enablePanelpnlEmergency();
    }

    public void checkConfirmVacInputCode() {
        String inputCode = txtJobInputCode.getText().trim();
        String returnStr = jobDAO.checkJobInputCode(inputCode, "Confirm");

        if (inputCode.equals("")) {
            lblCheckJobInputCode.setBackground(new Color(0, 153, 0));
            lblCheckJobInputCode.setText("INPUT CODE");
            btnJobStart.setEnabled(false);
            return;
        }

        if (!returnStr.equals("Not confirm")) {
            lblCheckJobInputCode.setBackground(Color.red);
            lblCheckJobInputCode.setText("NOT FOUND or CONFIRMED");
            btnJobStart.setEnabled(false);
            return;
        }

        lblCheckJobInputCode.setBackground(Color.blue);
        lblCheckJobInputCode.setText("NOT CONFIRM");
        btnJobStart.setEnabled(true);
        loadConfirmVac();
    }

    public void checkEmergencyInputCode() {
        String inputCode = txtJobInputCode.getText().trim();
        String returnStr = jobDAO.checkJobInputCode(inputCode, "Emergency");

        if (inputCode.equals("")) {
            lblCheckJobInputCode.setBackground(new Color(0, 153, 0));
            lblCheckJobInputCode.setText("INPUT CODE");
            btnJobStart.setEnabled(false);
            return;
        }

        if (!returnStr.equals("Found")) {
            lblCheckJobInputCode.setBackground(Color.red);
            lblCheckJobInputCode.setText("NOT FOUND EMPLOYEE");
            btnJobStart.setEnabled(false);
            return;
        }

        lblCheckJobInputCode.setBackground(Color.blue);
        lblCheckJobInputCode.setText("ROTATION");
        loadDataEmergency();
        btnJobStart.setEnabled(true);
    }

    public void loadConfirmVac() {
        Vector v = jobDAO.loadVacToConfirm(txtJobInputCode.getText().trim());
        String desName = v.get(0).toString();
        String depName = v.get(1).toString();

        txtJobConfirmVacDes.setText(desName);
        txtJobConfirmVacDep.setText(depName);
    }

    public boolean checkConfirmVacInsert() {
        if (!rdbJobConfirmVacConfim.isSelected() && !rdbJobConfirmVacDeny.isSelected()) {
            lblCheckJobConfirmVac.setForeground(Color.red);
            rdbJobConfirmVacConfim.requestFocus();
            return false;
        }
        lblCheckJobConfirmVac.setForeground(Color.white);
        return true;
    }

    public void resetFormConfirmVac() {
        txtJobConfirmVacDes.setText("");
        txtJobConfirmVacDep.setText("");
        txaJobConfirmVacRemark.setText("");
        grdJobConfirm.clearSelection();
        lblCheckJobConfirmVac.setForeground(Color.white);
    }

    public void resetFormEmergency() {
        txtEmerDes.setText("");
        cbEmerDep.setSelectedIndex(0);
        cbEmerSec.setSelectedIndex(0);
        txaEmergencyRemark.setText("");
        
        lblCheckEmerDep.setForeground(Color.white);
        lblCheckEmerSec.setForeground(Color.white);
    }
    
    public void loadDataEmergency() {
        txtEmerDes.setText(jobDAO.loadPresentDesign(txtJobInputCode.getText().toString()));
        jobDAO.loadCbDep(cbEmerDep);
        
    }
    
    public boolean checkEmergencyInsert() {
        if (cbEmerDep.getSelectedIndex()== 0) {
            lblCheckEmerDep.setForeground(Color.red);
            lblCheckEmerDep.setText("Please select Department");
            cbEmerDep.requestFocus();
            return false;
        }
        lblCheckEmerDep.setForeground(Color.white);
        
        if (cbEmerSec.getSelectedIndex()== 0) {
            lblCheckEmerSec.setForeground(Color.red);
            lblCheckEmerSec.setText("Please select Section");
            cbEmerSec.requestFocus();
            return false;
        }
        lblCheckEmerSec.setForeground(Color.white);
        
        
        return true;
    }
}
